/**
 *
 */
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;

extends OpenApi;


init(config: OpenApi.Config){
  super(config);
  @endpointRule = '';
  
  checkConfig(config);
  @endpoint = getEndpoint('quickbi-public', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!Util.empty(endpoint)) {
    return endpoint;
  }
  
  if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}

model AddDataLevelPermissionRuleUsersRequest {
  addUserModel?: string(name='AddUserModel', description='This parameter is required.', example='{"ruleId":"a5bb24da-***-a891683e14da","cubeId":"7c7223ae-***-3c744528014b","addModel":{"userGroups":["0d5fb19b-***-1248fc27ca51","3d2c23d4-***-f6390f325c2d"],"users":["4334***358","Huang***3fa822"]}}'),
}

model AddDataLevelPermissionRuleUsersResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='D8749D65-E80A-433C-AF1B-CE9C180FF3B4'),
  result?: boolean(name='Result', description='The execution result of the interface. Valid values:\\\\n\\\\n*   true: The request was successful.\\\\n*   false: The request failed.\\\\n', example='true'),
  success?: boolean(name='Success', description='Indicates whether the request is successful. Valid values:\\\\n\\\\n*   true: The request was successful.\\\\n*   false: The request failed.\\\\n', example='true'),
}

model AddDataLevelPermissionRuleUsersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AddDataLevelPermissionRuleUsersResponseBody(name='body'),
}

/**
 * @summary Add selected groups of people incrementally for a single row and column permission rule.
 *
 * @description > : You can only Quick BI the new row-column permission model. If you are still using the old row-column permission model, migrate to the new row-column permission model before you call this operation. To migrate row-level permissions to the new row-level permission model, perform the following steps: Choose Organizations> Security Configurations> Upgrade Row-Level Permissions. On the Upgrade Row-Level Permissions page, click **Upgrade**.\\n
 *
 * @param request AddDataLevelPermissionRuleUsersRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AddDataLevelPermissionRuleUsersResponse
 */
async function addDataLevelPermissionRuleUsersWithOptions(request: AddDataLevelPermissionRuleUsersRequest, runtime: Util.RuntimeOptions): AddDataLevelPermissionRuleUsersResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.addUserModel)) {
    query['AddUserModel'] = request.addUserModel;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddDataLevelPermissionRuleUsers',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Add selected groups of people incrementally for a single row and column permission rule.
 *
 * @description > : You can only Quick BI the new row-column permission model. If you are still using the old row-column permission model, migrate to the new row-column permission model before you call this operation. To migrate row-level permissions to the new row-level permission model, perform the following steps: Choose Organizations> Security Configurations> Upgrade Row-Level Permissions. On the Upgrade Row-Level Permissions page, click **Upgrade**.\\n
 *
 * @param request AddDataLevelPermissionRuleUsersRequest
 * @return AddDataLevelPermissionRuleUsersResponse
 */
async function addDataLevelPermissionRuleUsers(request: AddDataLevelPermissionRuleUsersRequest): AddDataLevelPermissionRuleUsersResponse {
  var runtime = new Util.RuntimeOptions{};
  return addDataLevelPermissionRuleUsersWithOptions(request, runtime);
}

model AddDataLevelPermissionWhiteListRequest {
  cubeId?: string(name='CubeId', description='The ID of the training dataset that you want to remove from the specified custom linguistic model.

This parameter is required.', example='7c7223ae-***-3c744528014b'),
  operateType?: string(name='OperateType', description='Operation Type: You can set this parameter to one of the following values.

*   ADD: Add a whitelist
*   DELETE: deletes a whitelist.', example='ADD'),
  ruleType?: string(name='RuleType', description='The type of row-level permissions.

*   ROW_LEVEL: row-level permissions,
*   COLUMN_LEVEL: column-level permissions', example='ROW_LEVEL'),
  targetIds?: string(name='TargetIds', example='43342***435,1553a****41231'),
  targetType?: string(name='TargetType', description='Modify the type of the whitelist:

*   1: user
*   2: user group', example='1'),
}

model AddDataLevelPermissionWhiteListResponseBody = {
  requestId?: string(name='RequestId', example='D8749D65-E80A-433C-AF1B-CE9C180FF3B4'),
  result?: boolean(name='Result', example='true'),
  success?: boolean(name='Success', example='true'),
}

model AddDataLevelPermissionWhiteListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AddDataLevelPermissionWhiteListResponseBody(name='body'),
}

/**
 * @summary 43342***435,1553a****41231
 *
 * @description ROW_LEVEL
 *
 * @param request AddDataLevelPermissionWhiteListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AddDataLevelPermissionWhiteListResponse
 */
async function addDataLevelPermissionWhiteListWithOptions(request: AddDataLevelPermissionWhiteListRequest, runtime: Util.RuntimeOptions): AddDataLevelPermissionWhiteListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.cubeId)) {
    query['CubeId'] = request.cubeId;
  }
  if (!Util.isUnset(request.operateType)) {
    query['OperateType'] = request.operateType;
  }
  if (!Util.isUnset(request.ruleType)) {
    query['RuleType'] = request.ruleType;
  }
  if (!Util.isUnset(request.targetIds)) {
    query['TargetIds'] = request.targetIds;
  }
  if (!Util.isUnset(request.targetType)) {
    query['TargetType'] = request.targetType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddDataLevelPermissionWhiteList',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 43342***435,1553a****41231
 *
 * @description ROW_LEVEL
 *
 * @param request AddDataLevelPermissionWhiteListRequest
 * @return AddDataLevelPermissionWhiteListResponse
 */
async function addDataLevelPermissionWhiteList(request: AddDataLevelPermissionWhiteListRequest): AddDataLevelPermissionWhiteListResponse {
  var runtime = new Util.RuntimeOptions{};
  return addDataLevelPermissionWhiteListWithOptions(request, runtime);
}

model AddShareReportRequest {
  authPoint?: int32(name='AuthPoint', description='The scope of authorization. Valid values:

*   1: view only
*   3: View and export

This parameter is required.', example='3'),
  expireDate?: long(name='ExpireDate', description='The validity period of the share. The value is a timestamp in milliseconds.

This parameter is required.', example='1608202110838'),
  shareToId?: string(name='ShareToId', description='The ID of the person to be shared, which may be the user ID of the Quick BI or the user group ID.

*   If ShareToType is 0 (user), ShareTo is the user ID.
*   When ShareToType is set to 1 (user group), ShareTo is the user group ID.
*   When ShareToType=2 (organization), ShareTo is the ID of the organization.', example='de4bc5f9429141cc8091cdd1c15b****'),
  shareToType?: int32(name='ShareToType', description='The share type of the template. Valid values:

*   0: user
*   1: user group
*   2: organization

This parameter is required.', example='0'),
  worksId?: string(name='WorksId', description='The ID of the shared work. The works here include BI portal, dashboards, spreadsheets, and self-service access.

This parameter is required.', example='6b407e50-e774-406b-9956-da2425c2****'),
}

model AddShareReportResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='05739b8e-3de0-4204-9669-7f04f02522b9'),
  result?: boolean(name='Result', description='The execution result of the interface is returned. Valid values:

*   true: The request was successful.
*   false: The request fails.', example='true'),
  success?: boolean(name='Success', description='Indicates whether the request is successful. Valid values:

*   true: The request was successful.
*   false: The request failed.', example='true'),
}

model AddShareReportResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AddShareReportResponseBody(name='body'),
}

/**
 * @summary Add a sharing configuration for data works.
 *
 * @param request AddShareReportRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AddShareReportResponse
 */
async function addShareReportWithOptions(request: AddShareReportRequest, runtime: Util.RuntimeOptions): AddShareReportResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.authPoint)) {
    query['AuthPoint'] = request.authPoint;
  }
  if (!Util.isUnset(request.expireDate)) {
    query['ExpireDate'] = request.expireDate;
  }
  if (!Util.isUnset(request.shareToId)) {
    query['ShareToId'] = request.shareToId;
  }
  if (!Util.isUnset(request.shareToType)) {
    query['ShareToType'] = request.shareToType;
  }
  if (!Util.isUnset(request.worksId)) {
    query['WorksId'] = request.worksId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddShareReport',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Add a sharing configuration for data works.
 *
 * @param request AddShareReportRequest
 * @return AddShareReportResponse
 */
async function addShareReport(request: AddShareReportRequest): AddShareReportResponse {
  var runtime = new Util.RuntimeOptions{};
  return addShareReportWithOptions(request, runtime);
}

model AddUserRequest {
  accountId?: string(name='AccountId'),
  accountName?: string(name='AccountName', example='xxxxxx@163.com', deprecated=true),
  adminUser?: boolean(name='AdminUser', description='Add organization members.', example='true', deprecated=true, nullable=false),
  authAdminUser?: boolean(name='AuthAdminUser', example='true', deprecated=true),
  nickName?: string(name='NickName', description='This parameter is required.'),
  roleIds?: string(name='RoleIds'),
  userType?: int32(name='UserType', description='This parameter is required.', example='1'),
}

model AddUserResponseBody = {
  requestId?: string(name='RequestId', example='D787E1A3-A93C-424A-B626-C2B05DF8D885'),
  result?: {
    accountName?: string(name='AccountName', example='xxxxxx@163.com'),
    adminUser?: boolean(name='AdminUser', example='true'),
    authAdminUser?: boolean(name='AuthAdminUser', example='true'),
    nickName?: string(name='NickName'),
    roleIdList?: [ long ](name='RoleIdList'),
    userId?: string(name='UserId', example='b5d8fd9348cc4327****afb604'),
    userType?: int32(name='UserType', example='1'),
  }(name='Result'),
  success?: boolean(name='Success', example='true'),
}

model AddUserResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AddUserResponseBody(name='body'),
}

/**
 * @summary auditing
 *
 * @param request AddUserRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AddUserResponse
 */
async function addUserWithOptions(request: AddUserRequest, runtime: Util.RuntimeOptions): AddUserResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.accountId)) {
    query['AccountId'] = request.accountId;
  }
  if (!Util.isUnset(request.accountName)) {
    query['AccountName'] = request.accountName;
  }
  if (!Util.isUnset(request.adminUser)) {
    query['AdminUser'] = request.adminUser;
  }
  if (!Util.isUnset(request.authAdminUser)) {
    query['AuthAdminUser'] = request.authAdminUser;
  }
  if (!Util.isUnset(request.nickName)) {
    query['NickName'] = request.nickName;
  }
  if (!Util.isUnset(request.userType)) {
    query['UserType'] = request.userType;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.roleIds)) {
    body['RoleIds'] = request.roleIds;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AddUser',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary auditing
 *
 * @param request AddUserRequest
 * @return AddUserResponse
 */
async function addUser(request: AddUserRequest): AddUserResponse {
  var runtime = new Util.RuntimeOptions{};
  return addUserWithOptions(request, runtime);
}

model AddUserGroupMemberRequest {
  userGroupId?: string(name='UserGroupId', description='The result of adding members to a user group is returned. Valid values:

*   true: The task is added.
*   false: The tag failed to be added.

This parameter is required.', example='555c4cd****'),
  userIdList?: string(name='UserIdList', description='Indicates whether the request is successful. Valid values:

*   true: The request was successful.
*   false: The request failed.

This parameter is required.', example='46e537a5****,3dadsu****'),
}

model AddUserGroupMemberResponseBody = {
  requestId?: string(name='RequestId', example='B6141A5A-A9EF-5F16-BF34-EFB9C1CCE4F3'),
  result?: boolean(name='Result', example='true'),
  success?: boolean(name='Success', example='true'),
}

model AddUserGroupMemberResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AddUserGroupMemberResponseBody(name='body'),
}

/**
 * @summary The ID of the request.
 *
 * @param request AddUserGroupMemberRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AddUserGroupMemberResponse
 */
async function addUserGroupMemberWithOptions(request: AddUserGroupMemberRequest, runtime: Util.RuntimeOptions): AddUserGroupMemberResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.userGroupId)) {
    query['UserGroupId'] = request.userGroupId;
  }
  if (!Util.isUnset(request.userIdList)) {
    query['UserIdList'] = request.userIdList;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddUserGroupMember',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary The ID of the request.
 *
 * @param request AddUserGroupMemberRequest
 * @return AddUserGroupMemberResponse
 */
async function addUserGroupMember(request: AddUserGroupMemberRequest): AddUserGroupMemberResponse {
  var runtime = new Util.RuntimeOptions{};
  return addUserGroupMemberWithOptions(request, runtime);
}

model AddUserGroupMembersRequest {
  userGroupIds?: string(name='UserGroupIds', description='The IDs of the user groups. Separate the IDs with commas (,). Example: aGroupId,bGroupId,cGroupIds

This parameter is required.', example='0d5fb19b-****-****-99da-1248fc27ca51'),
  userId?: string(name='UserId', description='The user ID of the Quick BI.

This parameter is required.', example='46e5****37a5'),
}

model AddUserGroupMembersResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='D8749D65-E80A-433C-AF1B-CE9C180FF3B4'),
  result?: boolean(name='Result', description='The execution result of the interface. Valid values:

*   true: The request was successful.
*   false: The request failed.', example='true'),
  success?: boolean(name='Success', description='Indicates whether the request is successful. Valid values:

*   true: The request was successful.
*   false: The request failed.', example='true'),
}

model AddUserGroupMembersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AddUserGroupMembersResponseBody(name='body'),
}

/**
 * @summary Add users to a specified user group at a time.
 *
 * @param request AddUserGroupMembersRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AddUserGroupMembersResponse
 */
async function addUserGroupMembersWithOptions(request: AddUserGroupMembersRequest, runtime: Util.RuntimeOptions): AddUserGroupMembersResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.userGroupIds)) {
    query['UserGroupIds'] = request.userGroupIds;
  }
  if (!Util.isUnset(request.userId)) {
    query['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddUserGroupMembers',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Add users to a specified user group at a time.
 *
 * @param request AddUserGroupMembersRequest
 * @return AddUserGroupMembersResponse
 */
async function addUserGroupMembers(request: AddUserGroupMembersRequest): AddUserGroupMembersResponse {
  var runtime = new Util.RuntimeOptions{};
  return addUserGroupMembersWithOptions(request, runtime);
}

model AddUserTagMetaRequest {
  tagDescription?: string(name='TagDescription'),
  tagName?: string(name='TagName', description='This parameter is required.'),
}

model AddUserTagMetaResponseBody = {
  requestId?: string(name='RequestId', example='D787E1A3-A93C-424A-B626-C2B05DF8D885'),
  result?: string(name='Result', example='0822a7d9-****-****-****-f20163ab9b0d'),
  success?: boolean(name='Success', example='true'),
}

model AddUserTagMetaResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AddUserTagMetaResponseBody(name='body'),
}

/**
 * @summary Add the metadata of an organization member tag.
 *
 * @param request AddUserTagMetaRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AddUserTagMetaResponse
 */
async function addUserTagMetaWithOptions(request: AddUserTagMetaRequest, runtime: Util.RuntimeOptions): AddUserTagMetaResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.tagDescription)) {
    query['TagDescription'] = request.tagDescription;
  }
  if (!Util.isUnset(request.tagName)) {
    query['TagName'] = request.tagName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddUserTagMeta',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Add the metadata of an organization member tag.
 *
 * @param request AddUserTagMetaRequest
 * @return AddUserTagMetaResponse
 */
async function addUserTagMeta(request: AddUserTagMetaRequest): AddUserTagMetaResponse {
  var runtime = new Util.RuntimeOptions{};
  return addUserTagMetaWithOptions(request, runtime);
}

model AddUserToWorkspaceRequest {
  roleId?: long(name='RoleId', description='This parameter is required.', example='25'),
  userId?: string(name='UserId', description='This parameter is required.', example='de4bc5f9429141cc8091cdd1c15b****'),
  workspaceId?: string(name='WorkspaceId', description='This parameter is required.', example='95296e95-ca89-4c7d-8af9-dedf0ad0****'),
}

model AddUserToWorkspaceResponseBody = {
  requestId?: string(name='RequestId', example='D787E1A3-A93C-424A-B626-C2B05DF8D885'),
  result?: boolean(name='Result', example='true'),
  success?: boolean(name='Success', example='true'),
}

model AddUserToWorkspaceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AddUserToWorkspaceResponseBody(name='body'),
}

/**
 * @summary 添加成员到指定工作空间。
 *
 * @param request AddUserToWorkspaceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AddUserToWorkspaceResponse
 */
async function addUserToWorkspaceWithOptions(request: AddUserToWorkspaceRequest, runtime: Util.RuntimeOptions): AddUserToWorkspaceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.roleId)) {
    query['RoleId'] = request.roleId;
  }
  if (!Util.isUnset(request.userId)) {
    query['UserId'] = request.userId;
  }
  if (!Util.isUnset(request.workspaceId)) {
    query['WorkspaceId'] = request.workspaceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddUserToWorkspace',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 添加成员到指定工作空间。
 *
 * @param request AddUserToWorkspaceRequest
 * @return AddUserToWorkspaceResponse
 */
async function addUserToWorkspace(request: AddUserToWorkspaceRequest): AddUserToWorkspaceResponse {
  var runtime = new Util.RuntimeOptions{};
  return addUserToWorkspaceWithOptions(request, runtime);
}

model AddWorkspaceUsersRequest {
  roleId?: long(name='RoleId', description='This parameter is required.', example='25'),
  userIds?: string(name='UserIds', description='This parameter is required.', example='de4bc5f9429141cc8091cdd1c15b****'),
  workspaceId?: string(name='WorkspaceId', description='This parameter is required.', example='95296e95-ca89-4c7d-8af9-dedf0ad0****'),
}

model AddWorkspaceUsersResponseBody = {
  requestId?: string(name='RequestId', example='7AAB95D7-2E11-4FE2-94BC-858E4FC0C976'),
  result?: {
    failure?: int32(name='Failure', example='2'),
    failureDetail?: map[string]any(name='FailureDetail', example='{"2046274934845893" : "AE0150010001: This user already exists.", "1213444447906552" : "AE0150010001: This user already exists."}'),
    success?: int32(name='Success', example='1'),
    total?: int32(name='Total', example='3'),
  }(name='Result'),
  success?: boolean(name='Success', example='true'),
}

model AddWorkspaceUsersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AddWorkspaceUsersResponseBody(name='body'),
}

/**
 * @summary 批量添加成员到工作空间。
 *
 * @param request AddWorkspaceUsersRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AddWorkspaceUsersResponse
 */
async function addWorkspaceUsersWithOptions(request: AddWorkspaceUsersRequest, runtime: Util.RuntimeOptions): AddWorkspaceUsersResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.roleId)) {
    query['RoleId'] = request.roleId;
  }
  if (!Util.isUnset(request.userIds)) {
    query['UserIds'] = request.userIds;
  }
  if (!Util.isUnset(request.workspaceId)) {
    query['WorkspaceId'] = request.workspaceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddWorkspaceUsers',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 批量添加成员到工作空间。
 *
 * @param request AddWorkspaceUsersRequest
 * @return AddWorkspaceUsersResponse
 */
async function addWorkspaceUsers(request: AddWorkspaceUsersRequest): AddWorkspaceUsersResponse {
  var runtime = new Util.RuntimeOptions{};
  return addWorkspaceUsersWithOptions(request, runtime);
}

model AllotDatasetAccelerationTaskRequest {
  cubeId?: string(name='CubeId', description='This parameter is required.', example='7c7223ae-****-3c744528014b'),
}

model AllotDatasetAccelerationTaskResponseBody = {
  requestId?: string(name='RequestId', example='D8749D65-E80A-433C-AF1B-CE9C180FF3B4'),
  result?: boolean(name='Result', example='true'),
  success?: boolean(name='Success', example='true'),
}

model AllotDatasetAccelerationTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AllotDatasetAccelerationTaskResponseBody(name='body'),
}

/**
 * @summary 触发数据集抽取加速。
 *
 * @param request AllotDatasetAccelerationTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AllotDatasetAccelerationTaskResponse
 */
async function allotDatasetAccelerationTaskWithOptions(request: AllotDatasetAccelerationTaskRequest, runtime: Util.RuntimeOptions): AllotDatasetAccelerationTaskResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.cubeId)) {
    query['CubeId'] = request.cubeId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AllotDatasetAccelerationTask',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 触发数据集抽取加速。
 *
 * @param request AllotDatasetAccelerationTaskRequest
 * @return AllotDatasetAccelerationTaskResponse
 */
async function allotDatasetAccelerationTask(request: AllotDatasetAccelerationTaskRequest): AllotDatasetAccelerationTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return allotDatasetAccelerationTaskWithOptions(request, runtime);
}

model AuthorizeMenuRequest {
  authPointsValue?: int32(name='AuthPointsValue', description='Authorizes the permissions of the menu. Valid values:

*   1: view
*   3: View + Export (default)', example='3'),
  dataPortalId?: string(name='DataPortalId', description='The ID of the BI portal.

This parameter is required.', example='0d173abb53e84c8ca7495429163b****'),
  menuIds?: string(name='MenuIds', description='The menu ID of the BI portal leaf node.

*   The directory menu cannot be authorized.
*   You can upload multiple parameters at a time. Separate multiple IDs with commas (,). The maximum number of parameters that can be modified at a time is 100.

This parameter is required.', example='54kqgoa****,pg1n135****'),
  userGroupIds?: string(name='UserGroupIds', description='The IDs of the user groups.

*   You can upload multiple parameters at a time. Separate multiple IDs with commas (,). The maximum number of parameters that can be modified at a time is 200.
*   UserGroupIds and UserIds cannot be empty at the same time', example='34fd141d-4598-4093-8c33-8e066dcb****,3d2c23d4-2b41-4af8-a1f5-f6390f32****'),
  userIds?: string(name='UserIds', description='The IDs of the end users. The UserID of the Quick BI is used instead of the UID of Alibaba Cloud.

*   You can upload multiple parameters at a time. Separate multiple IDs with commas (,). The maximum number of parameters that can be modified at a time is 200.', example='204627493484****,121344444790****'),
}

model AuthorizeMenuResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='188F0B12-00EF-41B3-944A-FB7EF06C9F43'),
  result?: int32(name='Result', description='The number of authorized menus.', example='2'),
  success?: boolean(name='Success', description='Indicates whether the request is successful. Valid values:

*   true: The request was successful.
*   false: The request failed.', example='true'),
}

model AuthorizeMenuResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AuthorizeMenuResponseBody(name='body'),
}

/**
 * @summary Batch authorization of BI portal menu will be skipped automatically.
 *
 * @param request AuthorizeMenuRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AuthorizeMenuResponse
 */
async function authorizeMenuWithOptions(request: AuthorizeMenuRequest, runtime: Util.RuntimeOptions): AuthorizeMenuResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.authPointsValue)) {
    query['AuthPointsValue'] = request.authPointsValue;
  }
  if (!Util.isUnset(request.dataPortalId)) {
    query['DataPortalId'] = request.dataPortalId;
  }
  if (!Util.isUnset(request.menuIds)) {
    query['MenuIds'] = request.menuIds;
  }
  if (!Util.isUnset(request.userGroupIds)) {
    query['UserGroupIds'] = request.userGroupIds;
  }
  if (!Util.isUnset(request.userIds)) {
    query['UserIds'] = request.userIds;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AuthorizeMenu',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Batch authorization of BI portal menu will be skipped automatically.
 *
 * @param request AuthorizeMenuRequest
 * @return AuthorizeMenuResponse
 */
async function authorizeMenu(request: AuthorizeMenuRequest): AuthorizeMenuResponse {
  var runtime = new Util.RuntimeOptions{};
  return authorizeMenuWithOptions(request, runtime);
}

model BatchAddFeishuUsersRequest {
  feishuUsers?: string(name='FeishuUsers'),
  isAdmin?: boolean(name='IsAdmin', example='False'),
  isAuthAdmin?: boolean(name='IsAuthAdmin', example='true'),
  userGroupIds?: string(name='UserGroupIds', example='"0d5fb19b-5555-41f0-99da-1248fc27ca51,0f868dd6_68dd_4d13_8422_c5dca3bd4b61"'),
  userType?: int32(name='UserType', example='1'),
}

model BatchAddFeishuUsersResponseBody = {
  requestId?: string(name='RequestId', example='D8749D65-E80A-433C-AF1B-CE9C180FF3B4'),
  result?: {
    failCount?: int32(name='FailCount', example='10'),
    failResults?: [ 
      {
        failInfos?: [ 
          {
            code?: string(name='Code', example='ACCOUNT_EXIST'),
            codeDesc?: string(name='CodeDesc'),
            input?: string(name='Input', example='20'),
          }
        ](name='FailInfos'),
      }
    ](name='FailResults'),
    okCount?: int32(name='OkCount', example='1'),
  }(name='Result', example='True'),
  success?: boolean(name='Success', example='True'),
}

model BatchAddFeishuUsersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: BatchAddFeishuUsersResponseBody(name='body'),
}

/**
 * @deprecated OpenAPI BatchAddFeishuUsers is deprecated
 *
 * @summary 批量添加飞书用户。
 *
 * @param request BatchAddFeishuUsersRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return BatchAddFeishuUsersResponse
 */
// Deprecated
async function batchAddFeishuUsersWithOptions(request: BatchAddFeishuUsersRequest, runtime: Util.RuntimeOptions): BatchAddFeishuUsersResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.feishuUsers)) {
    query['FeishuUsers'] = request.feishuUsers;
  }
  if (!Util.isUnset(request.isAdmin)) {
    query['IsAdmin'] = request.isAdmin;
  }
  if (!Util.isUnset(request.isAuthAdmin)) {
    query['IsAuthAdmin'] = request.isAuthAdmin;
  }
  if (!Util.isUnset(request.userGroupIds)) {
    query['UserGroupIds'] = request.userGroupIds;
  }
  if (!Util.isUnset(request.userType)) {
    query['UserType'] = request.userType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'BatchAddFeishuUsers',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @deprecated OpenAPI BatchAddFeishuUsers is deprecated
 *
 * @summary 批量添加飞书用户。
 *
 * @param request BatchAddFeishuUsersRequest
 * @return BatchAddFeishuUsersResponse
 */
// Deprecated
async function batchAddFeishuUsers(request: BatchAddFeishuUsersRequest): BatchAddFeishuUsersResponse {
  var runtime = new Util.RuntimeOptions{};
  return batchAddFeishuUsersWithOptions(request, runtime);
}

model CancelAuthorizationMenuRequest {
  dataPortalId?: string(name='DataPortalId', description='This parameter is required.', example='0d173abb53e84c8ca7495429163b****'),
  menuIds?: string(name='MenuIds', description='This parameter is required.', example='54kqgoa****,pg1n135****'),
  userGroupIds?: string(name='UserGroupIds', example='34fd141d-4598-4093-8c33-8e066dcb****,3d2c23d4-2b41-4af8-a1f5-f6390f32****'),
  userIds?: string(name='UserIds', example='204627493484****,121344444790****'),
}

model CancelAuthorizationMenuResponseBody = {
  requestId?: string(name='RequestId', example='D8749D65-E80A-433C-AF1B-CE9C180FF3B4'),
  result?: int32(name='Result', example='2'),
  success?: boolean(name='Success', example='true'),
}

model CancelAuthorizationMenuResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CancelAuthorizationMenuResponseBody(name='body'),
}

/**
 * @summary 根据门户菜单ID，取消指定用户、用户组的授权记录。
 *
 * @param request CancelAuthorizationMenuRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CancelAuthorizationMenuResponse
 */
async function cancelAuthorizationMenuWithOptions(request: CancelAuthorizationMenuRequest, runtime: Util.RuntimeOptions): CancelAuthorizationMenuResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.dataPortalId)) {
    query['DataPortalId'] = request.dataPortalId;
  }
  if (!Util.isUnset(request.menuIds)) {
    query['MenuIds'] = request.menuIds;
  }
  if (!Util.isUnset(request.userGroupIds)) {
    query['UserGroupIds'] = request.userGroupIds;
  }
  if (!Util.isUnset(request.userIds)) {
    query['UserIds'] = request.userIds;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CancelAuthorizationMenu',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 根据门户菜单ID，取消指定用户、用户组的授权记录。
 *
 * @param request CancelAuthorizationMenuRequest
 * @return CancelAuthorizationMenuResponse
 */
async function cancelAuthorizationMenu(request: CancelAuthorizationMenuRequest): CancelAuthorizationMenuResponse {
  var runtime = new Util.RuntimeOptions{};
  return cancelAuthorizationMenuWithOptions(request, runtime);
}

model CancelCollectionRequest {
  userId?: string(name='UserId', description='The ID of the favorite user. The user ID is the UserID of the Quick BI, not the UID of Alibaba Cloud.

This parameter is required.', example='121344444790****'),
  worksId?: string(name='WorksId', description='The ID of the work to cancel the collection.

This parameter is required.', example='5d6ae4e7-cede-43cd-b4d3-d2fd442a9202'),
}

model CancelCollectionResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='7c7223ae-****-3c744528014b'),
  result?: boolean(name='Result', description='The execution result of the interface is returned. Valid values:

*   true: The request was successful.
*   false: The request fails.', example='true'),
  success?: boolean(name='Success', description='Indicates whether the request is successful. Valid values:

*   true: The request was successful.
*   false: The request failed.', example='true'),
}

model CancelCollectionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CancelCollectionResponseBody(name='body'),
}

/**
 * @summary Cancel the data works from the user\\"s collection.
 *
 * @param request CancelCollectionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CancelCollectionResponse
 */
async function cancelCollectionWithOptions(request: CancelCollectionRequest, runtime: Util.RuntimeOptions): CancelCollectionResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.userId)) {
    query['UserId'] = request.userId;
  }
  if (!Util.isUnset(request.worksId)) {
    query['WorksId'] = request.worksId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CancelCollection',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Cancel the data works from the user\\"s collection.
 *
 * @param request CancelCollectionRequest
 * @return CancelCollectionResponse
 */
async function cancelCollection(request: CancelCollectionRequest): CancelCollectionResponse {
  var runtime = new Util.RuntimeOptions{};
  return cancelCollectionWithOptions(request, runtime);
}

model CancelReportShareRequest {
  reportId?: string(name='ReportId', description='The ID of the work. The works here include BI portal, dashboards, spreadsheets, and self-service access.

This parameter is required.', example='6b407e50-e774-406b-9956-da2425c2****'),
  shareToIds?: string(name='ShareToIds', description='The ID of the person to be shared, which may be the user ID of the Quick BI or the user group ID.

*   If ShareToType is 0 (user), ShareTo is the user ID.
*   When ShareToType is set to 1 (user group), ShareTo is the user group ID.
*   When ShareToType=2 (organization), ShareTo is the ID of the organization.

This parameter is required.', example='de4bc5f9429141cc8091cdd1c15b****'),
  shareToType?: int32(name='ShareToType', description='The deletion method. Valid values:

*   0: Delete by user
*   1: Delete by user group
*   2: Delete by organization

This parameter is required.', example='0'),
}

model CancelReportShareResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='DC4E1E63-B337-44F8-8C22-6F00DF67E2C3'),
  result?: boolean(name='Result', description='The execution result of the interface is returned. Valid values:

*   true: The request was successful.
*   false: The request fails.', example='true'),
  success?: boolean(name='Success', description='Indicates whether the request is successful. Valid values:

*   true: The request was successful.
*   false: The request failed.', example='true'),
}

model CancelReportShareResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CancelReportShareResponseBody(name='body'),
}

/**
 * @summary Delete a share authorization for a data work.
 *
 * @param request CancelReportShareRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CancelReportShareResponse
 */
async function cancelReportShareWithOptions(request: CancelReportShareRequest, runtime: Util.RuntimeOptions): CancelReportShareResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.reportId)) {
    query['ReportId'] = request.reportId;
  }
  if (!Util.isUnset(request.shareToIds)) {
    query['ShareToIds'] = request.shareToIds;
  }
  if (!Util.isUnset(request.shareToType)) {
    query['ShareToType'] = request.shareToType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CancelReportShare',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Delete a share authorization for a data work.
 *
 * @param request CancelReportShareRequest
 * @return CancelReportShareResponse
 */
async function cancelReportShare(request: CancelReportShareRequest): CancelReportShareResponse {
  var runtime = new Util.RuntimeOptions{};
  return cancelReportShareWithOptions(request, runtime);
}

model ChangeVisibilityModelRequest {
  dataPortalId?: string(name='DataPortalId', description='The number of menus that are successfully modified.

This parameter is required.', example='0d173abb53e84c8ca7495429163b****'),
  menuIds?: string(name='MenuIds', description='Indicates whether the request is successful. Valid values:

*   true: The request was successful.
*   false: The request failed.

This parameter is required.', example='54kqgoa****,pg1n135****'),
  showOnlyWithAccess?: boolean(name='ShowOnlyWithAccess', description='This parameter is required.', example='true'),
}

model ChangeVisibilityModelResponseBody = {
  requestId?: string(name='RequestId', example='D787E1A3-A93C-424A-B626-C2B05DF8D885'),
  result?: int32(name='Result', example='2'),
  success?: boolean(name='Success', example='true'),
}

model ChangeVisibilityModelResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ChangeVisibilityModelResponseBody(name='body'),
}

/**
 * @summary The ID of the request.
 *
 * @param request ChangeVisibilityModelRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ChangeVisibilityModelResponse
 */
async function changeVisibilityModelWithOptions(request: ChangeVisibilityModelRequest, runtime: Util.RuntimeOptions): ChangeVisibilityModelResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.dataPortalId)) {
    query['DataPortalId'] = request.dataPortalId;
  }
  if (!Util.isUnset(request.menuIds)) {
    query['MenuIds'] = request.menuIds;
  }
  if (!Util.isUnset(request.showOnlyWithAccess)) {
    query['ShowOnlyWithAccess'] = request.showOnlyWithAccess;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ChangeVisibilityModel',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary The ID of the request.
 *
 * @param request ChangeVisibilityModelRequest
 * @return ChangeVisibilityModelResponse
 */
async function changeVisibilityModel(request: ChangeVisibilityModelRequest): ChangeVisibilityModelResponse {
  var runtime = new Util.RuntimeOptions{};
  return changeVisibilityModelWithOptions(request, runtime);
}

model CheckReadableRequest {
  userId?: string(name='UserId', description='The user ID of the Quick BI to be checked.

This parameter is required.', example='de4bc5f9429141cc8091cdd1c15b****'),
  worksId?: string(name='WorksId', description='The ID of the work. Resources here include BI portal, dashboards, spreadsheets, and self-service access.

This parameter is required.', example='95296e95-ca89-4c7d-8af9-dedf0ad0****'),
}

model CheckReadableResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='D787E1A3-A93C-424A-B626-C2B05DF8D885'),
  result?: boolean(name='Result', description='The execution result of the interface is returned. Valid values:

*   true: The request was successful.
*   false: The request fails.', example='true'),
  success?: boolean(name='Success', description='Indicates whether the request is successful. Valid values:

*   true: The request was successful.
*   false: The request failed.', example='true'),
}

model CheckReadableResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CheckReadableResponseBody(name='body'),
}

/**
 * @summary Queries whether a user has permissions to view data works, such as dashboards and workbooks.
 *
 * @param request CheckReadableRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CheckReadableResponse
 */
async function checkReadableWithOptions(request: CheckReadableRequest, runtime: Util.RuntimeOptions): CheckReadableResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.userId)) {
    query['UserId'] = request.userId;
  }
  if (!Util.isUnset(request.worksId)) {
    query['WorksId'] = request.worksId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CheckReadable',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries whether a user has permissions to view data works, such as dashboards and workbooks.
 *
 * @param request CheckReadableRequest
 * @return CheckReadableResponse
 */
async function checkReadable(request: CheckReadableRequest): CheckReadableResponse {
  var runtime = new Util.RuntimeOptions{};
  return checkReadableWithOptions(request, runtime);
}

model CreateTicketRequest {
  accountName?: string(name='AccountName', description='The user\\\\"s account name.

- If the user is an Alibaba Cloud primary account **wangwu**, the format is **[Primary Account]**, for example, **wangwu**.
- If the user is a RAM account **zhangsan**@aliyun.cn, the format is **[Primary Account: Sub-account]**, for example, **wangwu:zhangsan**.

> Only one of UserId and AccountName needs to be filled in. If neither is filled in, it will default to binding the report\\\\"s Owner, and the report will be accessed with that user\\\\"s identity. If you need to configure row-level permissions, please refer to [Row-Level Permissions](https://help.aliyun.com/document_detail/322783.html).', example='test user', deprecated=true),
  accountType?: int32(name='AccountType', description='The type of the user\\\\"s account.
- 1: Alibaba Cloud account
- 3: Quick BI self-built account
- 4: DingTalk
- 5: RAM sub-account
- 9: WeCom
- 10: Feishu
> If AccountName is not empty, then AccountType must also not be empty.', example='1', deprecated=true),
  cmptId?: string(name='CmptId', description='Component ID. This is the ID of a component within the above-mentioned dashboard; other types of works do not support this.
Refer to the [QueryWorksBloodRelationship](https://next.api.aliyun.com/api/quickbi-public/2022-01-01/QueryWorksBloodRelationship?spm=a2c4g.11186623.0.0.15615d7aWVvWAl&params={}&lang=JAVA&tab=DOC&sdkStyle=old) API for obtaining the component ID.', example='0fc6a275c7f64f17b1****a306ce0f31'),
  expireTime?: int32(name='ExpireTime', description='Expiration time
- Unit: minutes
- Default: 240', example='200'),
  globalParam?: string(name='GlobalParam', description='Global parameters for the report filter conditions.
- A string in JsonArray format.

> If you need to use global parameter capabilities, please contact the [Quick BI Operations Manager](https://h5-alimebot.dingtalk.com/intl/index.htm?spm=a2c4g.11186623.0.0.3da14f6chrDv9e&sourceType=ding_talk&from=DEFFB9G5KBByQkwq23wneFIOmaJ).', example='[{"paramKey":"price","joinType":"and","conditionList":[{"operate":">","value":"0"}]}]'),
  ticketNum?: int32(name='TicketNum', description='The number of tickets. Each time a ticket is used, the number of tickets decreases by 1.
- Default value: 1
- Recommended value: 1
- Maximum value: 99999', example='1'),
  userId?: string(name='UserId', description='Quick BI\\\\"s UserId, which is not your Alibaba Cloud account ID.
You can call the [QueryUserInfoByAccount](https://next.api.aliyun.com/api/quickbi-public/2022-01-01/QueryUserInfoByAccount?spm=a2c4g.11186623.0.0.15615d7aWVvWAl&params={}&tab=DOC&sdkStyle=old) API to obtain the UserId. An example of a UserId is fe67f61a35a94b7da1a34ba174a7****.

> Only one of UserId and AccountName needs to be filled in. If neither is filled in, it will default to binding the report\\\\"s Owner, and the report will be accessed with that user\\\\"s identity. If you need to configure row-level permissions, please refer to [Row-Level Permissions](https://help.aliyun.com/document_detail/322783.html).', example='46e537466****92704c8'),
  watermarkParam?: string(name='WatermarkParam', description='Watermark parameters for the report.
- Must not exceed 50 characters.
- When the report type is a large screen, watermark parameter passing is not supported.', example='Three-party embedding'),
  worksId?: string(name='WorksId', description='The ID of the report to be embedded. Currently supports dashboards, spreadsheets, data screens, self-service data retrieval, ad-hoc analysis, and data entry.

This parameter is required.', example='a206f5f3-****-e9b17c835b03'),
}

model CreateTicketResponseBody = {
  requestId?: string(name='RequestId', description='Request ID.', example='D787E1A3-A93C-424A-B626-C2B05DF8D885'),
  result?: string(name='Result', description='The generated ticket value.', example='ccd3428c-****-****-a608-26bae29dffee'),
  success?: boolean(name='Success', description='是否请求成功。取值范围：
- true：请求成功
- false：请求失败', example='true'),
}

model CreateTicketResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateTicketResponseBody(name='body'),
}

/**
 * @summary Generates a ticket for third-party embedding.
 *
 * @description For detailed usage, please refer to the [Report Embedding Data Permission Control and Parameter Passing Security Enhancement Solution](https://help.aliyun.com/document_detail/391291.html).
 *
 * @param request CreateTicketRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateTicketResponse
 */
async function createTicketWithOptions(request: CreateTicketRequest, runtime: Util.RuntimeOptions): CreateTicketResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.accountName)) {
    query['AccountName'] = request.accountName;
  }
  if (!Util.isUnset(request.accountType)) {
    query['AccountType'] = request.accountType;
  }
  if (!Util.isUnset(request.cmptId)) {
    query['CmptId'] = request.cmptId;
  }
  if (!Util.isUnset(request.expireTime)) {
    query['ExpireTime'] = request.expireTime;
  }
  if (!Util.isUnset(request.globalParam)) {
    query['GlobalParam'] = request.globalParam;
  }
  if (!Util.isUnset(request.ticketNum)) {
    query['TicketNum'] = request.ticketNum;
  }
  if (!Util.isUnset(request.userId)) {
    query['UserId'] = request.userId;
  }
  if (!Util.isUnset(request.watermarkParam)) {
    query['WatermarkParam'] = request.watermarkParam;
  }
  if (!Util.isUnset(request.worksId)) {
    query['WorksId'] = request.worksId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateTicket',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Generates a ticket for third-party embedding.
 *
 * @description For detailed usage, please refer to the [Report Embedding Data Permission Control and Parameter Passing Security Enhancement Solution](https://help.aliyun.com/document_detail/391291.html).
 *
 * @param request CreateTicketRequest
 * @return CreateTicketResponse
 */
async function createTicket(request: CreateTicketRequest): CreateTicketResponse {
  var runtime = new Util.RuntimeOptions{};
  return createTicketWithOptions(request, runtime);
}

model CreateTicket4CopilotRequest {
  accountName?: string(name='AccountName'),
  accountType?: int32(name='AccountType', example='1'),
  copilotId?: string(name='CopilotId', description='This parameter is required.', example='ccd3428c-dd23-460c-a608-26bae29dffee'),
  expireTime?: int32(name='ExpireTime', example='200'),
  ticketNum?: int32(name='TicketNum', example='1'),
  userId?: string(name='UserId', example='9c-asdawf-casxcasd-asdasd'),
}

model CreateTicket4CopilotResponseBody = {
  requestId?: string(name='RequestId', example='D787E1A3-A93C-424A-B626-C2B05DF8D885'),
  result?: string(name='Result', example='f5eeb52e-d9c2-4a8b-80e3-47ab55c2****'),
  success?: boolean(name='Success', example='true'),
}

model CreateTicket4CopilotResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateTicket4CopilotResponseBody(name='body'),
}

/**
 * @summary 生成智能小Q嵌入ticket。
 *
 * @param request CreateTicket4CopilotRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateTicket4CopilotResponse
 */
async function createTicket4CopilotWithOptions(request: CreateTicket4CopilotRequest, runtime: Util.RuntimeOptions): CreateTicket4CopilotResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.accountName)) {
    query['AccountName'] = request.accountName;
  }
  if (!Util.isUnset(request.accountType)) {
    query['AccountType'] = request.accountType;
  }
  if (!Util.isUnset(request.copilotId)) {
    query['CopilotId'] = request.copilotId;
  }
  if (!Util.isUnset(request.expireTime)) {
    query['ExpireTime'] = request.expireTime;
  }
  if (!Util.isUnset(request.ticketNum)) {
    query['TicketNum'] = request.ticketNum;
  }
  if (!Util.isUnset(request.userId)) {
    query['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateTicket4Copilot',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 生成智能小Q嵌入ticket。
 *
 * @param request CreateTicket4CopilotRequest
 * @return CreateTicket4CopilotResponse
 */
async function createTicket4Copilot(request: CreateTicket4CopilotRequest): CreateTicket4CopilotResponse {
  var runtime = new Util.RuntimeOptions{};
  return createTicket4CopilotWithOptions(request, runtime);
}

model CreateUserGroupRequest {
  parentUserGroupId?: string(name='ParentUserGroupId', description='The ID of the parent user group. You can add new user groups to this group:

*   If you enter the ID of a parent user group, the new user group is added to the user group with the ID.
*   If you enter -1, the new user group is added to the root directory.

This parameter is required.', example='3d2c23d4-2b41-4af8-a1f5-f6390f32****'),
  userGroupDescription?: string(name='UserGroupDescription', description='The description of the user group.

*   Format verification: Maximum length 255
*   Special format verification: Chinese and English digits_ \\\\ / | () ] [', example='User group description'),
  userGroupId?: string(name='UserGroupId', description='The unique ID of the user group.

*   If you specify the UserGroupId parameter, the system automatically generates the UserGroupId parameter. If you specify the UserGroupId parameter, the user ID is used as the user group ID. You must ensure that the user ID is unique within the organization.
*   Format verification: Maximum length 64, cannot be -1,', example='pop0001'),
  userGroupName?: string(name='UserGroupName', description='The name of the RAM user group.

*   Format verification: Maximum length 255
*   Special format verification: Chinese and English digits_ \\\\ / | () ] [

This parameter is required.', example='Hangzhou Financial Report'),
}

model CreateUserGroupResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='36829379-0C38-5BC0-830A-92665BF77D4F'),
  result?: string(name='Result', description='The ID of the added user group is returned. An empty string \\\\"\\\\" is returned if the add fails.', example='f5eeb52e-d9c2-4a8b-80e3-47ab55c2****'),
  success?: boolean(name='Success', description='Indicates whether the request is successful. Valid values:

*   true: The request was successful.
*   false: The request failed.', example='true'),
}

model CreateUserGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateUserGroupResponseBody(name='body'),
}

/**
 * @summary Create a user group. You can specify a parent user group.
 *
 * @param request CreateUserGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateUserGroupResponse
 */
async function createUserGroupWithOptions(request: CreateUserGroupRequest, runtime: Util.RuntimeOptions): CreateUserGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.parentUserGroupId)) {
    query['ParentUserGroupId'] = request.parentUserGroupId;
  }
  if (!Util.isUnset(request.userGroupDescription)) {
    query['UserGroupDescription'] = request.userGroupDescription;
  }
  if (!Util.isUnset(request.userGroupId)) {
    query['UserGroupId'] = request.userGroupId;
  }
  if (!Util.isUnset(request.userGroupName)) {
    query['UserGroupName'] = request.userGroupName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateUserGroup',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Create a user group. You can specify a parent user group.
 *
 * @param request CreateUserGroupRequest
 * @return CreateUserGroupResponse
 */
async function createUserGroup(request: CreateUserGroupRequest): CreateUserGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return createUserGroupWithOptions(request, runtime);
}

model DataSetBloodRequest {
  dataSetIds?: string(name='DataSetIds', description='List of dataset IDs, separated by English commas.

This parameter is required.', example='234235234,234235235,234235235'),
  userId?: string(name='UserId', description='Specify the owner of the report, which is the userId.', example='dasasgaj342351'),
  worksType?: string(name='WorksType', description='Specify the type of report:
- REPORT: Workbooks
- dashboardOfflineQuery: Downloads
- DASHBOARD: Dashboard
- ANALYSIS: Ad Hoc Analysis
- SCREEN: Visualization Screen
- PAGE: Old dashboard', example='PAGE'),
}

model DataSetBloodResponseBody = {
  requestId?: string(name='RequestId', description='Request ID.', example='46e537a5****,3dadsu****'),
  result?: [ 
    {
      worksId?: string(name='WorksId', description='Work ID.', example='ccd3428c-****-****-a608-26bae29dffee'),
      worksType?: string(name='WorksType', description='Work types: - REPORT: 
- REPORT: Workbooks
- dashboardOfflineQuery: Downloads
- DASHBOARD: Dashboard
- ANALYSIS: Ad Hoc Analysis
- SCREEN: Visualization Screen
- PAGE: Old dashboard', example='PAGE'),
    }
  ](name='Result', description='Array of works.'),
  success?: boolean(name='Success', description='Indicates whether the request was successful. Possible values:

- true: Request succeeded
- false: Request failed', example='true'),
}

model DataSetBloodResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DataSetBloodResponseBody(name='body'),
}

/**
 * @summary Query works information under the specified dataset.
 *
 * @param request DataSetBloodRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DataSetBloodResponse
 */
async function dataSetBloodWithOptions(request: DataSetBloodRequest, runtime: Util.RuntimeOptions): DataSetBloodResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.dataSetIds)) {
    query['DataSetIds'] = request.dataSetIds;
  }
  if (!Util.isUnset(request.userId)) {
    query['UserId'] = request.userId;
  }
  if (!Util.isUnset(request.worksType)) {
    query['WorksType'] = request.worksType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DataSetBlood',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Query works information under the specified dataset.
 *
 * @param request DataSetBloodRequest
 * @return DataSetBloodResponse
 */
async function dataSetBlood(request: DataSetBloodRequest): DataSetBloodResponse {
  var runtime = new Util.RuntimeOptions{};
  return dataSetBloodWithOptions(request, runtime);
}

model DataSourceBloodRequest {
  dataSourceId?: string(name='DataSourceId', description='This parameter is required.', example='44051300991327000048'),
}

model DataSourceBloodResponseBody = {
  requestId?: string(name='RequestId', example='46e537a5****,3dadsu****'),
  result?: [ string ](name='Result'),
  success?: boolean(name='Success', example='true'),
}

model DataSourceBloodResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DataSourceBloodResponseBody(name='body'),
}

/**
 * @summary 查询引用指定数据源下的数据集信息。
 *
 * @param request DataSourceBloodRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DataSourceBloodResponse
 */
async function dataSourceBloodWithOptions(request: DataSourceBloodRequest, runtime: Util.RuntimeOptions): DataSourceBloodResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.dataSourceId)) {
    query['DataSourceId'] = request.dataSourceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DataSourceBlood',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 查询引用指定数据源下的数据集信息。
 *
 * @param request DataSourceBloodRequest
 * @return DataSourceBloodResponse
 */
async function dataSourceBlood(request: DataSourceBloodRequest): DataSourceBloodResponse {
  var runtime = new Util.RuntimeOptions{};
  return dataSourceBloodWithOptions(request, runtime);
}

model DelayTicketExpireTimeRequest {
  expireTime?: int32(name='ExpireTime', description='The time to postpone.

*   Unit: minutes. Valid values: 0 to 240. Unit: minutes. Valid values: 4 hours.
*   Expired bills cannot be extended.

This parameter is required.', example='200'),
  ticket?: string(name='Ticket', description='The value of the third-party embedded ticket, that is, the accessTicket value in the URL.

This parameter is required.', example='040e6f79d33444838e*****c7206c070'),
}

model DelayTicketExpireTimeResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='D787E1A3-A93C-424A-B626-C2B05DF8D885'),
  result?: boolean(name='Result', description='Whether the extension is successful. Valid values:

*   true: The request was successful.
*   false: The request failed.', example='true'),
  success?: boolean(name='Success', description='Indicates whether the request is successful. Valid values:

*   true: The request was successful.
*   false: The request failed.', example='true'),
}

model DelayTicketExpireTimeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DelayTicketExpireTimeResponseBody(name='body'),
}

/**
 * @summary Update the expiration time of the ticket embedded in the report.
 *
 * @param request DelayTicketExpireTimeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DelayTicketExpireTimeResponse
 */
async function delayTicketExpireTimeWithOptions(request: DelayTicketExpireTimeRequest, runtime: Util.RuntimeOptions): DelayTicketExpireTimeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.expireTime)) {
    query['ExpireTime'] = request.expireTime;
  }
  if (!Util.isUnset(request.ticket)) {
    query['Ticket'] = request.ticket;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DelayTicketExpireTime',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Update the expiration time of the ticket embedded in the report.
 *
 * @param request DelayTicketExpireTimeRequest
 * @return DelayTicketExpireTimeResponse
 */
async function delayTicketExpireTime(request: DelayTicketExpireTimeRequest): DelayTicketExpireTimeResponse {
  var runtime = new Util.RuntimeOptions{};
  return delayTicketExpireTimeWithOptions(request, runtime);
}

model DeleteDataLevelPermissionRuleUsersRequest {
  deleteUserModel?: string(name='DeleteUserModel', description='This parameter is required.', example='{"ruleId":"a5bb24da-***-a891683e14da","cubeId":"7c7223ae-***-3c744528014b","delModel":{"userGroups":["0d5fb19b-***-1248fc27ca51","3d2c23d4-***-f6390f325c2d"],"users":["4334***358","Huang***3fa822"]}}'),
}

model DeleteDataLevelPermissionRuleUsersResponseBody = {
  requestId?: string(name='RequestId', example='D8749D65-E80A-433C-AF1B-CE9C180FF3B4'),
  result?: boolean(name='Result', example='true'),
  success?: boolean(name='Success', example='true'),
}

model DeleteDataLevelPermissionRuleUsersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteDataLevelPermissionRuleUsersResponseBody(name='body'),
}

/**
 * @summary { "ruleId": "a5bb24da- ***-a891683e14da", // The ID of the row-column permission rule. "cubeId": "7c7223ae- ***-3c744528014b", // The ID of the dataset. "delModel": { "userGroups": [ "0d5fb19b- ***-1248 fc27ca51", // Delete the user group ID of the user group. "3d2c23d4-***-f6390f325c2d" ], "users": [ "4334 ***358", // Delete the UserID of the user group. "Huang***3fa822" ] } }
 *
 * @description {"ruleId":"a5bb24da-***-a891683e14da","cubeId":"7c7223ae-***-3c744528014b","delModel":{"userGroups":["0d5fb19b-***-1248fc27ca51","3d2c23d4-***-f6390f325c2d"],"users":["4334***358","Huang***3fa822"]}}
 *
 * @param request DeleteDataLevelPermissionRuleUsersRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteDataLevelPermissionRuleUsersResponse
 */
async function deleteDataLevelPermissionRuleUsersWithOptions(request: DeleteDataLevelPermissionRuleUsersRequest, runtime: Util.RuntimeOptions): DeleteDataLevelPermissionRuleUsersResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.deleteUserModel)) {
    query['DeleteUserModel'] = request.deleteUserModel;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteDataLevelPermissionRuleUsers',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary { "ruleId": "a5bb24da- ***-a891683e14da", // The ID of the row-column permission rule. "cubeId": "7c7223ae- ***-3c744528014b", // The ID of the dataset. "delModel": { "userGroups": [ "0d5fb19b- ***-1248 fc27ca51", // Delete the user group ID of the user group. "3d2c23d4-***-f6390f325c2d" ], "users": [ "4334 ***358", // Delete the UserID of the user group. "Huang***3fa822" ] } }
 *
 * @description {"ruleId":"a5bb24da-***-a891683e14da","cubeId":"7c7223ae-***-3c744528014b","delModel":{"userGroups":["0d5fb19b-***-1248fc27ca51","3d2c23d4-***-f6390f325c2d"],"users":["4334***358","Huang***3fa822"]}}
 *
 * @param request DeleteDataLevelPermissionRuleUsersRequest
 * @return DeleteDataLevelPermissionRuleUsersResponse
 */
async function deleteDataLevelPermissionRuleUsers(request: DeleteDataLevelPermissionRuleUsersRequest): DeleteDataLevelPermissionRuleUsersResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteDataLevelPermissionRuleUsersWithOptions(request, runtime);
}

model DeleteDataLevelRuleConfigRequest {
  cubeId?: string(name='CubeId', description='This parameter is required.', example='7c7223ae-****-3c744528014b'),
  ruleId?: string(name='RuleId', description='This parameter is required.', example='a5bb24da-****-a891683e14da'),
}

model DeleteDataLevelRuleConfigResponseBody = {
  requestId?: string(name='RequestId', example='D8749D65-E80A-433C-AF1B-CE9C180FF3B4'),
  result?: boolean(name='Result', example='true'),
  success?: boolean(name='Success', example='true'),
}

model DeleteDataLevelRuleConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteDataLevelRuleConfigResponseBody(name='body'),
}

/**
 * @summary The ID of the request.
 *
 * @description The ID of the training dataset that you want to remove from the specified custom linguistic model.
 *
 * @param request DeleteDataLevelRuleConfigRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteDataLevelRuleConfigResponse
 */
async function deleteDataLevelRuleConfigWithOptions(request: DeleteDataLevelRuleConfigRequest, runtime: Util.RuntimeOptions): DeleteDataLevelRuleConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.cubeId)) {
    query['CubeId'] = request.cubeId;
  }
  if (!Util.isUnset(request.ruleId)) {
    query['RuleId'] = request.ruleId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteDataLevelRuleConfig',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary The ID of the request.
 *
 * @description The ID of the training dataset that you want to remove from the specified custom linguistic model.
 *
 * @param request DeleteDataLevelRuleConfigRequest
 * @return DeleteDataLevelRuleConfigResponse
 */
async function deleteDataLevelRuleConfig(request: DeleteDataLevelRuleConfigRequest): DeleteDataLevelRuleConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteDataLevelRuleConfigWithOptions(request, runtime);
}

model DeleteTicketRequest {
  ticket?: string(name='Ticket', description='Deletes a specified ticket from an embedded report.

This parameter is required.', example='040e6f79d****7d283c7206c070'),
}

model DeleteTicketResponseBody = {
  requestId?: string(name='RequestId', example='D787E1A3-A93C-424A-B626-C2B05DF8D885'),
  result?: boolean(name='Result', example='true'),
  success?: boolean(name='Success', example='true'),
}

model DeleteTicketResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteTicketResponseBody(name='body'),
}

/**
 * @summary Deletes a specified ticket from an embedded report.
 *
 * @param request DeleteTicketRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteTicketResponse
 */
async function deleteTicketWithOptions(request: DeleteTicketRequest, runtime: Util.RuntimeOptions): DeleteTicketResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ticket)) {
    query['Ticket'] = request.ticket;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteTicket',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Deletes a specified ticket from an embedded report.
 *
 * @param request DeleteTicketRequest
 * @return DeleteTicketResponse
 */
async function deleteTicket(request: DeleteTicketRequest): DeleteTicketResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteTicketWithOptions(request, runtime);
}

model DeleteUserRequest {
  transferUserId?: string(name='TransferUserId', example='f5****afccd9e434a274'),
  userId?: string(name='UserId', description='Deletes a user from a specified organization.

This parameter is required.', example='fe67f61a35a94b7da1a34ba174a7****'),
}

model DeleteUserResponseBody = {
  requestId?: string(name='RequestId', example='DC4E1E63-B337-44F8-8C22-6F00DF67E2C3'),
  result?: boolean(name='Result', example='true'),
  success?: boolean(name='Success', example='true'),
}

model DeleteUserResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteUserResponseBody(name='body'),
}

/**
 * @summary auditing
 *
 * @param request DeleteUserRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteUserResponse
 */
async function deleteUserWithOptions(request: DeleteUserRequest, runtime: Util.RuntimeOptions): DeleteUserResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.transferUserId)) {
    query['TransferUserId'] = request.transferUserId;
  }
  if (!Util.isUnset(request.userId)) {
    query['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteUser',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary auditing
 *
 * @param request DeleteUserRequest
 * @return DeleteUserResponse
 */
async function deleteUser(request: DeleteUserRequest): DeleteUserResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteUserWithOptions(request, runtime);
}

model DeleteUserFromWorkspaceRequest {
  userId?: string(name='UserId', description='This parameter is required.', example='de4bc5f9429141cc8091cdd1c15b****'),
  workspaceId?: string(name='WorkspaceId', description='This parameter is required.', example='95296e95-ca89-4c7d-8af9-dedf0ad0****'),
}

model DeleteUserFromWorkspaceResponseBody = {
  requestId?: string(name='RequestId', example='DC4E1E63-B337-44F8-8C22-6F00DF67E2C3'),
  result?: boolean(name='Result', example='true'),
  success?: boolean(name='Success', example='true'),
}

model DeleteUserFromWorkspaceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteUserFromWorkspaceResponseBody(name='body'),
}

/**
 * @summary 删除指定工作空间的成员。
 *
 * @param request DeleteUserFromWorkspaceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteUserFromWorkspaceResponse
 */
async function deleteUserFromWorkspaceWithOptions(request: DeleteUserFromWorkspaceRequest, runtime: Util.RuntimeOptions): DeleteUserFromWorkspaceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.userId)) {
    query['UserId'] = request.userId;
  }
  if (!Util.isUnset(request.workspaceId)) {
    query['WorkspaceId'] = request.workspaceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteUserFromWorkspace',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 删除指定工作空间的成员。
 *
 * @param request DeleteUserFromWorkspaceRequest
 * @return DeleteUserFromWorkspaceResponse
 */
async function deleteUserFromWorkspace(request: DeleteUserFromWorkspaceRequest): DeleteUserFromWorkspaceResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteUserFromWorkspaceWithOptions(request, runtime);
}

model DeleteUserGroupRequest {
  userGroupId?: string(name='UserGroupId', description='The ID of the user group.

This parameter is required.', example='f5eeb52e-d9c2-4a8b-80e3-47ab55c2****'),
}

model DeleteUserGroupResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='F2775AB6-DE99-5FA6-86A4-72EA0A8AFEE3'),
  result?: boolean(name='Result', description='The execution result of the interface is returned. Valid values:

*   true: The request was successful.
*   false: The request fails.', example='true'),
  success?: boolean(name='Success', description='Indicates whether the request is successful. Valid values:

*   true: The request was successful.
*   false: The request failed.', example='true'),
}

model DeleteUserGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteUserGroupResponseBody(name='body'),
}

/**
 * @summary Deletes a user group in an organization.
 *
 * @param request DeleteUserGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteUserGroupResponse
 */
async function deleteUserGroupWithOptions(request: DeleteUserGroupRequest, runtime: Util.RuntimeOptions): DeleteUserGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.userGroupId)) {
    query['UserGroupId'] = request.userGroupId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteUserGroup',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Deletes a user group in an organization.
 *
 * @param request DeleteUserGroupRequest
 * @return DeleteUserGroupResponse
 */
async function deleteUserGroup(request: DeleteUserGroupRequest): DeleteUserGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteUserGroupWithOptions(request, runtime);
}

model DeleteUserGroupMemberRequest {
  userGroupId?: string(name='UserGroupId', description='The ID of the user group.

This parameter is required.', example='46e537****'),
  userId?: string(name='UserId', description='The user ID of the Quick BI.

This parameter is required.', example='2fe4fbd8****'),
}

model DeleteUserGroupMemberResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='DC4E1E63-B337-44F8-8C22-6F00DF67E2C3'),
  result?: boolean(name='Result', description='Returns the result of deleting a user group member. Valid values:

*   true: The task is deleted.
*   false: The deletion failed.', example='true'),
  success?: boolean(name='Success', description='Indicates whether the request is successful. Valid values:

*   true: The request was successful.
*   false: The request failed.', example='true'),
}

model DeleteUserGroupMemberResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteUserGroupMemberResponseBody(name='body'),
}

/**
 * @summary Deletes a specified member from a specified user group.
 *
 * @param request DeleteUserGroupMemberRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteUserGroupMemberResponse
 */
async function deleteUserGroupMemberWithOptions(request: DeleteUserGroupMemberRequest, runtime: Util.RuntimeOptions): DeleteUserGroupMemberResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.userGroupId)) {
    query['UserGroupId'] = request.userGroupId;
  }
  if (!Util.isUnset(request.userId)) {
    query['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteUserGroupMember',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Deletes a specified member from a specified user group.
 *
 * @param request DeleteUserGroupMemberRequest
 * @return DeleteUserGroupMemberResponse
 */
async function deleteUserGroupMember(request: DeleteUserGroupMemberRequest): DeleteUserGroupMemberResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteUserGroupMemberWithOptions(request, runtime);
}

model DeleteUserGroupMembersRequest {
  userGroupIds?: string(name='UserGroupIds', description='The ID of the user group(s) to exit.

- Supports batch parameters, separate IDs with a comma (,).

This parameter is required.', example='34fd141d-4598-4093-8c33-8e066dcb****,3d2c23d4-2b41-4af8-a1f5-f6390f32****'),
  userId?: string(name='UserId', description='The UserID of the user to be removed from the user group. Note that this UserID refers to the Quick BI UserID, not the Alibaba Cloud UID.

This parameter is required.', example='204627493484****'),
}

model DeleteUserGroupMembersResponseBody = {
  requestId?: string(name='RequestId', description='Request ID.', example='ABBAD906-****-5D18-B23D-****53AB0AA2'),
  result?: boolean(name='Result', description='Returns the result of the interface execution. Possible values:

- true: Execution succeeded
- false: Execution failed', example='true'),
  success?: boolean(name='Success', description='Indicates whether the request was successful. Possible values:

- true: Request succeeded
- false: Request failed', example='true'),
}

model DeleteUserGroupMembersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteUserGroupMembersResponseBody(name='body'),
}

/**
 * @summary Batch remove specified users from user groups.
 *
 * @param request DeleteUserGroupMembersRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteUserGroupMembersResponse
 */
async function deleteUserGroupMembersWithOptions(request: DeleteUserGroupMembersRequest, runtime: Util.RuntimeOptions): DeleteUserGroupMembersResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.userGroupIds)) {
    query['UserGroupIds'] = request.userGroupIds;
  }
  if (!Util.isUnset(request.userId)) {
    query['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteUserGroupMembers',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Batch remove specified users from user groups.
 *
 * @param request DeleteUserGroupMembersRequest
 * @return DeleteUserGroupMembersResponse
 */
async function deleteUserGroupMembers(request: DeleteUserGroupMembersRequest): DeleteUserGroupMembersResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteUserGroupMembersWithOptions(request, runtime);
}

model DeleteUserTagMetaRequest {
  tagId?: string(name='TagId', description='The ID of the tag to be deleted.

This parameter is required.', example='pop_001'),
}

model DeleteUserTagMetaResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='D787E1A3-A93C-424A-B626-C2B05DF8D885'),
  result?: boolean(name='Result', description='The execution result of the deleted tag is returned. Valid values:

*   true: The request was successful.
*   false: The request fails.', example='true'),
  success?: boolean(name='Success', description='Indicates whether the request is successful. Valid values:

*   true: The request was successful.
*   false: The request failed.', example='true'),
}

model DeleteUserTagMetaResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteUserTagMetaResponseBody(name='body'),
}

/**
 * @summary Deletes the tag metadata of an organization member.
 *
 * @param request DeleteUserTagMetaRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteUserTagMetaResponse
 */
async function deleteUserTagMetaWithOptions(request: DeleteUserTagMetaRequest, runtime: Util.RuntimeOptions): DeleteUserTagMetaResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.tagId)) {
    query['TagId'] = request.tagId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteUserTagMeta',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Deletes the tag metadata of an organization member.
 *
 * @param request DeleteUserTagMetaRequest
 * @return DeleteUserTagMetaResponse
 */
async function deleteUserTagMeta(request: DeleteUserTagMetaRequest): DeleteUserTagMetaResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteUserTagMetaWithOptions(request, runtime);
}

model GetDataSourceConnectionInfoRequest {
  dsId?: string(name='DsId', description='Data source ID.

This parameter is required.', example='7AAB95D-*****-****-*4FC0C976'),
}

model GetDataSourceConnectionInfoResponseBody = {
  requestId?: string(name='RequestId', description='Request ID.', example='7AAB95D-*****-****-*4FC0C976'),
  result?: {
    address?: string(name='Address', description='Database connection string address (domain or IP).', example='172.**.**.48'),
    authLevel?: string(name='AuthLevel', description='Permission level:

- 0 -- Private
- 1 -- Collaborative Editing (old)
- 11 -- Collaborative Editing - Space Members
- 12 -- Collaborative Editing - Specified to Individuals', example='0'),
    creatorId?: string(name='CreatorId', description='Quick BI user ID of the creator.', example='U240****0880C6095'),
    dsId?: string(name='DsId', description='Data source ID.', example='a201c85c-******'),
    dsType?: string(name='DsType', description='Data source type.', example='mysql'),
    dsVersion?: string(name='DsVersion', description='Version of the data source.', example='5.7'),
    instance?: string(name='Instance', description='Database instance, corresponding to the database name, and for ODPS, it is the project.', example='rm*********t44ju1'),
    instanceId?: string(name='InstanceId', description='Instance ID.', example='rm*********t44ju1'),
    modifyUser?: string(name='ModifyUser', description='Quick BI user ID of the modifier.', example='U240****0880C6095'),
    noSasl?: boolean(name='NoSasl', description='Whether the impala data source requires authentication to log in:

- true - Requires account and password login  
- false - No authentication required (default)', example='true'),
    parentDsType?: string(name='ParentDsType', description='Primary data source type for multi-engine data sources.', example='dataphin'),
    port?: string(name='Port', description='Port.', example='3306'),
    project?: string(name='Project', description='Used for front-end display when obtaining connection details for ODPS.', example='prod-ossdoc'),
    schema?: string(name='Schema', description='Database schema, only needs to be set for databases that support schemas.', example='Analysis'),
    showName?: string(name='ShowName', description='Display name of the data source on the front end.', example='0327'),
    workspaceId?: string(name='WorkspaceId', description='Workspace ID to which the data source belongs.', example='0de6**2-d**-4720-8836-0cc****1394c'),
  }(name='Result', description='Data source information.'),
  success?: boolean(name='Success', description='Indicates whether the operation was successful.', example='true'),
}

model GetDataSourceConnectionInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetDataSourceConnectionInfoResponseBody(name='body'),
}

/**
 * @summary Get Data Source Information
 *
 * @param request GetDataSourceConnectionInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetDataSourceConnectionInfoResponse
 */
async function getDataSourceConnectionInfoWithOptions(request: GetDataSourceConnectionInfoRequest, runtime: Util.RuntimeOptions): GetDataSourceConnectionInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.dsId)) {
    query['DsId'] = request.dsId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetDataSourceConnectionInfo',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Get Data Source Information
 *
 * @param request GetDataSourceConnectionInfoRequest
 * @return GetDataSourceConnectionInfoResponse
 */
async function getDataSourceConnectionInfo(request: GetDataSourceConnectionInfoRequest): GetDataSourceConnectionInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDataSourceConnectionInfoWithOptions(request, runtime);
}

model GetMailTaskStatusRequest {
  mailId?: string(name='MailId', description='Mail ID

This parameter is required.', example='d5a5****8b634d****5584f8dc159c62'),
  taskId?: long(name='TaskId', description='Task ID

> - If the task ID is not provided, the latest task status will be returned by default;
> - If the task ID is provided, the status of the specified task will be returned.', example='7218****0392****212'),
}

model GetMailTaskStatusResponseBody = {
  requestId?: string(name='RequestId', description='Request ID.', example='38C0FEC8-****-415C-A9F1-****422BDB65'),
  result?: [ 
    {
      execTime?: string(name='execTime', description='Execution time, in the format yyyy-MM-dd HH:mm:ss', example='2024-10-09 17:34:11'),
      mailId?: string(name='mailId', description='Mail ID', example='c38f73f4c5*****c808c41b3f4d23b7852'),
      status?: string(name='status', description='Mail status. Possible values:

- Success: SENT
- Failure: FAILED 
- In Progress: PROCESSING', example='SENT'),
      taskId?: long(name='taskId', description='Task ID', example='1282xxx610816'),
    }
  ](name='Result', description='Return result.'),
  success?: boolean(name='Success', description='Indicates whether the request was successful. Possible values:
- true: The request was successful. 
- false: The request failed.', example='true'),
}

model GetMailTaskStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetMailTaskStatusResponseBody(name='body'),
}

/**
 * @summary Check the running status of mail tasks within an organization
 *
 * @param request GetMailTaskStatusRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetMailTaskStatusResponse
 */
async function getMailTaskStatusWithOptions(request: GetMailTaskStatusRequest, runtime: Util.RuntimeOptions): GetMailTaskStatusResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.mailId)) {
    query['MailId'] = request.mailId;
  }
  if (!Util.isUnset(request.taskId)) {
    query['TaskId'] = request.taskId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetMailTaskStatus',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Check the running status of mail tasks within an organization
 *
 * @param request GetMailTaskStatusRequest
 * @return GetMailTaskStatusResponse
 */
async function getMailTaskStatus(request: GetMailTaskStatusRequest): GetMailTaskStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return getMailTaskStatusWithOptions(request, runtime);
}

model GetUserGroupInfoRequest {
  keyword?: string(name='Keyword', description='The ID of the user group.

This parameter is required.', example='The user group modifier. The UserID of the Quick BI is used instead of the UID of Alibaba Cloud.'),
}

model GetUserGroupInfoResponseBody = {
  requestId?: string(name='RequestId', example='D7980306-1F08-5A88-9FE7-ECB8B9C4C0F5'),
  result?: [ 
    {
      createTime?: string(name='CreateTime', example='2021-03-15 17:13:55'),
      createUser?: string(name='CreateUser', example='46e5374665ba4b679ee22e2a2927****'),
      identifiedPath?: string(name='IdentifiedPath'),
      modifiedTime?: string(name='ModifiedTime', example='2021-03-15 20:36:40'),
      modifyUser?: string(name='ModifyUser', example='46e5374665ba4b679ee22e2a2927****'),
      parentUsergroupId?: string(name='ParentUsergroupId', example='2fe4fbd8-588f-489a-b3e1-e92c7af0****'),
      usergroupDesc?: string(name='UsergroupDesc'),
      usergroupId?: string(name='UsergroupId', example='34fd141d-4598-4093-8c33-8e066dcb****'),
      usergroupName?: string(name='UsergroupName'),
    }
  ](name='Result'),
  success?: boolean(name='Success', example='true'),
}

model GetUserGroupInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetUserGroupInfoResponseBody(name='body'),
}

/**
 * @summary Test description
 *
 * @param request GetUserGroupInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetUserGroupInfoResponse
 */
async function getUserGroupInfoWithOptions(request: GetUserGroupInfoRequest, runtime: Util.RuntimeOptions): GetUserGroupInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.keyword)) {
    query['Keyword'] = request.keyword;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetUserGroupInfo',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Test description
 *
 * @param request GetUserGroupInfoRequest
 * @return GetUserGroupInfoResponse
 */
async function getUserGroupInfo(request: GetUserGroupInfoRequest): GetUserGroupInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return getUserGroupInfoWithOptions(request, runtime);
}

model GetWorksEmbedListRequest {
  keyword?: string(name='Keyword', description='Report name (fuzzy match)', example='test dataset'),
  pageNo?: int32(name='PageNo', description='Page number (defaults to 1 if empty)', example='1'),
  pageSize?: int32(name='PageSize', description='Number of items per page (defaults to 10 if empty)', example='100'),
  worksType?: string(name='WorksType', description='Report type

- page, Dashboard
- screen, Visualization Screen
- report, Workbooks
- ANALYSIS, Ad Hoc Analysis
- dashboardOfflineQuery, Downloads
- dataForm, Forms', example='page'),
  wsId?: string(name='WsId', description='Workspace ID', example='919818-***-*****-wdasd'),
}

model GetWorksEmbedListResponseBody = {
  requestId?: string(name='RequestId', description='Request ID', example='38C0F*****0-415****9F1-*****422BDB65'),
  result?: {
    data?: [ 
      {
        embedTime?: string(name='EmbedTime', description='Embed time', example='YYYY-mm-DD hh:MM:ss'),
        worksId?: string(name='WorksId', description='Report ID', example='897ce25e-****-****-af84-d13c5610****'),
        worksName?: string(name='WorksName', description='Report name', example='test'),
        worksType?: string(name='WorksType', description='Report type', example='page'),
        workspaceId?: string(name='WorkspaceId', description='Workspace ID', example='87c6b145-****-43e1-9426-8f93be23****'),
      }
    ](name='Data', description='Array of reports'),
    pageNo?: long(name='PageNo', description='Page number', example='1'),
    pageSize?: long(name='PageSize', description='Number of items per page', example='10'),
    totalNum?: long(name='TotalNum', description='Total number of items', example='18'),
    totalPages?: long(name='TotalPages', description='Total number of pages', example='2'),
  }(name='Result', description='Array of report objects'),
  success?: boolean(name='Success', description='Whether the request was successful', example='true'),
}

model GetWorksEmbedListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetWorksEmbedListResponseBody(name='body'),
}

/**
 * @summary Query the list of embedded reports
 *
 * @param request GetWorksEmbedListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetWorksEmbedListResponse
 */
async function getWorksEmbedListWithOptions(request: GetWorksEmbedListRequest, runtime: Util.RuntimeOptions): GetWorksEmbedListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.keyword)) {
    query['Keyword'] = request.keyword;
  }
  if (!Util.isUnset(request.pageNo)) {
    query['PageNo'] = request.pageNo;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.worksType)) {
    query['WorksType'] = request.worksType;
  }
  if (!Util.isUnset(request.wsId)) {
    query['WsId'] = request.wsId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetWorksEmbedList',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Query the list of embedded reports
 *
 * @param request GetWorksEmbedListRequest
 * @return GetWorksEmbedListResponse
 */
async function getWorksEmbedList(request: GetWorksEmbedListRequest): GetWorksEmbedListResponse {
  var runtime = new Util.RuntimeOptions{};
  return getWorksEmbedListWithOptions(request, runtime);
}

model ListApiDatasourceRequest {
  keyWord?: string(name='KeyWord', description='The keyword of the API data source name.', example='test'),
  pageNum?: int32(name='PageNum', description='Current page number for API data source list:

*   Pages start from page 1.
*   Default value: 1.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of rows per page in a paged query.

*   Default value: 10.
*   Valid values: 1 to 100.', example='10'),
  workspaceId?: string(name='WorkspaceId', description='The workspace ID.

This parameter is required.', example='89713491-cb4f-4579-b889-e82c35f1****'),
}

model ListApiDatasourceResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='D787E1A3-A93C-424A-B626-C2B05DF8D885'),
  result?: {
    data?: [ 
      {
        apiId?: string(name='ApiId', description='The ID of the API data source.', example='0f2c3c6409be4dc0810f2a5785e816a8'),
        body?: string(name='Body', description='The parameter configuration of the query statement in JSON format. You can customize the parameter configuration.', example='{"key1":"value1"}'),
        dataSize?: float(name='DataSize', description='The data volume of the API data source.

*   Unit: Kbit/s', example='0.39746094'),
        dateUpdateTime?: string(name='DateUpdateTime', description='The last synchronization time of the API data source.', example='2022-05-25 16:19:43'),
        gmtCreate?: string(name='GmtCreate', description='The time when the quota plan was created.', example='2022-05-25 16:19:43'),
        gmtModified?: string(name='GmtModified', description='The time when the optimization job was modified.', example='2022-05-25 16:19:43'),
        jobId?: string(name='JobId', description='The job ID.', example='REST_API_SYNC_0f2c3c6409be4dc0810f2a5785e816a8'),
        parameters?: string(name='Parameters', description='The parameter configurations in the JSONArray format.

*   name: parameter name
*   value: the parameter value', example='[{"name":"token","value":"xxxxxxxxxxxx"},{"name":"pageSize","value":100}]'),
        showName?: string(name='ShowName', description='The name of the API data source.', example='test data source'),
        statusType?: int32(name='StatusType', description='The status of the API data source synchronization task.

Valid values:

*   0: the to be run.
*   1: The is running.
*   2: The is successfully.
*   3: failed.', example='2'),
      }
    ](name='Data', description='The list of API data sources that were queried.'),
    pageNum?: int32(name='PageNum', description='The page number.', example='1'),
    pageSize?: int32(name='PageSize', description='The number of rows per page set when the interface is requested.', example='10'),
    totalNum?: int32(name='TotalNum', description='The total number of rows.', example='1'),
  }(name='Result', description='The query results are returned.'),
  success?: boolean(name='Success', description='Indicates whether the request was successful. Valid values:

*   true: The request was successful.
*   false: The request failed.', example='true'),
}

model ListApiDatasourceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListApiDatasourceResponseBody(name='body'),
}

/**
 * @summary Queries API data sources.
 *
 * @description For more information about the parameters, see [Create an API data source](https://help.aliyun.com/document_detail/409330.html).
 *
 * @param request ListApiDatasourceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListApiDatasourceResponse
 */
async function listApiDatasourceWithOptions(request: ListApiDatasourceRequest, runtime: Util.RuntimeOptions): ListApiDatasourceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.keyWord)) {
    query['KeyWord'] = request.keyWord;
  }
  if (!Util.isUnset(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.workspaceId)) {
    query['WorkspaceId'] = request.workspaceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListApiDatasource',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries API data sources.
 *
 * @description For more information about the parameters, see [Create an API data source](https://help.aliyun.com/document_detail/409330.html).
 *
 * @param request ListApiDatasourceRequest
 * @return ListApiDatasourceResponse
 */
async function listApiDatasource(request: ListApiDatasourceRequest): ListApiDatasourceResponse {
  var runtime = new Util.RuntimeOptions{};
  return listApiDatasourceWithOptions(request, runtime);
}

model ListByUserGroupIdRequest {
  userGroupIds?: string(name='UserGroupIds', description='The ID of the user group that you want to query. Separate multiple user groups with commas (,).

This parameter is required.', example='34fe-***-6dcb,84q9-****-4a274'),
}

model ListByUserGroupIdResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='D8749D65-E80A-433C-AF1B-CE9C180FF3B4'),
  result?: {
    failedUserGroupIds?: [ string ](name='FailedUserGroupIds'),
    userGroupModels?: [ 
      {
        createTime?: string(name='CreateTime', description='The time when the Secret was created.', example='2021-03-15 17:13:55'),
        createUser?: string(name='CreateUser', description='The UserID of the creator in the Quick BI.', example='46e5*******ee22e2a292704c8'),
        identifiedPath?: string(name='IdentifiedPath', description='The path of the user group.', example='2fe4fbd8-****-af083ea/34fd1-****-dcbc33f'),
        modifiedTime?: string(name='ModifiedTime', description='The time when the protection policy was last modified.', example='2021-03-15 20:36:40'),
        modifyUser?: string(name='ModifyUser', description='The UserID of the modifier in the Quick BI.', example='46e5*******ee22e2a292704c8'),
        parentUsergroupId?: string(name='ParentUsergroupId', description='The ID of the parent user group.', example='2fe4fbd8-588f-489a-b3e1-e92c7af083ea'),
        usergroupDesc?: string(name='UsergroupDesc', description='The description of the user group.', example='Description'),
        usergroupId?: string(name='UsergroupId', description='The ID of the user group.', example='34fd141d-****-4093-8c33-8e066dcbc33f'),
        usergroupName?: string(name='UsergroupName', description='The name of the user group.', example='Test user group'),
      }
    ](name='UserGroupModels', description='The details of the user group that was queried.'),
  }(name='Result', description='The user group query result is returned.'),
  success?: boolean(name='Success', description='Indicates whether the request is successful. Valid values:

*   true: The request was successful.
*   false: The request failed.', example='true'),
}

model ListByUserGroupIdResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListByUserGroupIdResponseBody(name='body'),
}

/**
 * @summary Queries user group information at a time by user group ID.
 *
 * @param request ListByUserGroupIdRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListByUserGroupIdResponse
 */
async function listByUserGroupIdWithOptions(request: ListByUserGroupIdRequest, runtime: Util.RuntimeOptions): ListByUserGroupIdResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.userGroupIds)) {
    query['UserGroupIds'] = request.userGroupIds;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListByUserGroupId',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries user group information at a time by user group ID.
 *
 * @param request ListByUserGroupIdRequest
 * @return ListByUserGroupIdResponse
 */
async function listByUserGroupId(request: ListByUserGroupIdRequest): ListByUserGroupIdResponse {
  var runtime = new Util.RuntimeOptions{};
  return listByUserGroupIdWithOptions(request, runtime);
}

model ListCollectionsRequest {
  userId?: string(name='UserId', description='The ID of the user. The user ID is the UserID of the Quick BI, not the UID of Alibaba Cloud.

This parameter is required.', example='fe67f61a35a94b7da1a34ba174a7****'),
}

model ListCollectionsResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='162A632E-0A88-51CF-98F8-94FDEE82DB7D'),
  result?: [ 
    {
      favoriteId?: int32(name='FavoriteId', example='12373'),
      ownerId?: string(name='OwnerId', example='fe67f61a35a94b7da1a34ba174a7****'),
      worksId?: string(name='WorksId', example='95296e95-ca89-4c7d-8af9-dedf0ad0****'),
      worksName?: string(name='WorksName'),
      worksType?: string(name='WorksType', example='dashboardOfflineQuery'),
      workspaceId?: string(name='WorkspaceId', example='9337d121-a78f-4c1b-a8bc-f81de117****'),
      workspaceName?: string(name='WorkspaceName'),
    }
  ](name='Result'),
  success?: boolean(name='Success', description='The primary key ID of the favorite record.', example='true'),
}

model ListCollectionsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListCollectionsResponseBody(name='body'),
}

/**
 * @summary The ID of the work.
 *
 * @param request ListCollectionsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListCollectionsResponse
 */
async function listCollectionsWithOptions(request: ListCollectionsRequest, runtime: Util.RuntimeOptions): ListCollectionsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.userId)) {
    query['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListCollections',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary The ID of the work.
 *
 * @param request ListCollectionsRequest
 * @return ListCollectionsResponse
 */
async function listCollections(request: ListCollectionsRequest): ListCollectionsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listCollectionsWithOptions(request, runtime);
}

model ListCubeDataLevelPermissionConfigRequest {
  cubeId?: string(name='CubeId', description='The ID of the training dataset that you want to remove from the specified custom linguistic model.

This parameter is required.', example='7c7223ae-****-3c744528014b'),
  ruleType?: string(name='RuleType', description='The type of the dataset row and column permission. Valid values:

*   ROW_LEVEL: row-level permissions
*   COLUMN_LEVEL: column-level permissions

This parameter is required.', example='ROW_LEVEL'),
}

model ListCubeDataLevelPermissionConfigResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='D8749D65-E80A-433C-AF1B-CE9C180FF3B4'),
  result?: string(name='Result', description='{ "isOpen": 1, "extraConfigModel": { // Additional configuration information "ruleType": "ROW_LEVEL", // The row-level permission type. "missHitPolicy": "NONE", // The hit rule policy: NONE has no permissions, and ALL has permissions. "cubeId": "7c7223 ae-31d1-4d2f-b11f-3c744528014b" // The ID of the dataset. }, "ruleType": "ROW_LEVEL", // Row-column permission type\\\\
"ruleModels": [ { "ruleUsersModel": { // The target population. "userGroups": [ "0d5fb19b- ****-1248 fc27ca51", // The ID of the user group. "4aa3f089-****-85f0-0e8ac7c2dee9" ], "users": [ "HuangJia ***2e3fa822", // The ID of the user. "4334***84358" ] }, "ruleContentModel": { "ruleContentType": "ROW_FIELD", // The row-column permission type. "ruleContentJson": "{"conditionNode":{"caption": " Period ","isMeasure":false,"pathId":"7d3b073bc6","relationOperator":"not-null","name":"7d3b073bc6","value":{"value":[""}UM]," ENueType "} // The JSON string of the row-column permission rule. "ruleOriginConfigJson": "{"operator":"and","operands":[{"labelName": " Period ","isValid":true,"uniqueId":"5","fieldId":"7d3b073bc6","error":false,"fieldType":"string",": default "" value":{"conditionOp":"not-null","conditionValue":""},"valueType":"ENUM"}}],"isRelation":true}" }, // The fixed-format JSON string required by the frontend "isOpen": 1, // The status of the row-column permission configuration. 1. On. 0. Off. "hitTakeEffect": 1, // Specifies whether the rule takes effect after a column-level permission is hit. 1 takes effect and 0 takes effect. "ruleName": "Test row-level permission_Do not delete", // The name of the row-column permission rule. "ruleLevelType": "ROW_LEVEL", // The row-column permission type. "ruleId": "a5bb24 da-772f-45e8-a43c-a891683e14da", // The ID of the row-column permission rule. "cubeId": "7c7223 ae-31d1-4d2f-b11f-3c744528014b", // The ID of the dataset. "ruleTargetScope": "OTHERS" rule takes effect: ALL owner and OTHERS designated owner. } ], "cubeId": "7c7223 ae-31d1-4d2f-b11f-3c744528014b" // The ID of the dataset. }', example='The JSON string of the row-column permission list. For more information, see the description.'),
  success?: boolean(name='Success', description='Indicates whether the request is successful. Valid values:

*   true: The request was successful.
*   false: The request failed.', example='true'),
}

model ListCubeDataLevelPermissionConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListCubeDataLevelPermissionConfigResponseBody(name='body'),
}

/**
 * @summary You can this operation to obtain a list of row and column permission configurations for a specified dataset.
 *
 * @description > : You can only Quick BI the new row-column permission model. If you are still using the old row-column permission model, migrate to the new row-column permission model before you call this operation. To migrate row-level permissions to the new row-level permission model, perform the following steps: Choose Organizations> Security Configurations> Upgrade Row-Level Permissions. On the Upgrade Row-Level Permissions page, click **Upgrade**.
 *
 * @param request ListCubeDataLevelPermissionConfigRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListCubeDataLevelPermissionConfigResponse
 */
async function listCubeDataLevelPermissionConfigWithOptions(request: ListCubeDataLevelPermissionConfigRequest, runtime: Util.RuntimeOptions): ListCubeDataLevelPermissionConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.cubeId)) {
    query['CubeId'] = request.cubeId;
  }
  if (!Util.isUnset(request.ruleType)) {
    query['RuleType'] = request.ruleType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListCubeDataLevelPermissionConfig',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary You can this operation to obtain a list of row and column permission configurations for a specified dataset.
 *
 * @description > : You can only Quick BI the new row-column permission model. If you are still using the old row-column permission model, migrate to the new row-column permission model before you call this operation. To migrate row-level permissions to the new row-level permission model, perform the following steps: Choose Organizations> Security Configurations> Upgrade Row-Level Permissions. On the Upgrade Row-Level Permissions page, click **Upgrade**.
 *
 * @param request ListCubeDataLevelPermissionConfigRequest
 * @return ListCubeDataLevelPermissionConfigResponse
 */
async function listCubeDataLevelPermissionConfig(request: ListCubeDataLevelPermissionConfigRequest): ListCubeDataLevelPermissionConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return listCubeDataLevelPermissionConfigWithOptions(request, runtime);
}

model ListDataLevelPermissionWhiteListRequest {
  cubeId?: string(name='CubeId', description='This parameter is required.', example='3d5db23c-e4f2-49dd-a883-92285b48e14a'),
  ruleType?: string(name='RuleType', description='This parameter is required.', example='ROW_LEVEL'),
}

model ListDataLevelPermissionWhiteListResponseBody = {
  requestId?: string(name='RequestId', example='D8749D65-E80A-433C-AF1B-CE9C180FF3B4'),
  result?: {
    cubeId?: string(name='CubeId', example='7c7223ae-****-3c744528014b'),
    ruleType?: string(name='RuleType', example='ROW_LEVEL'),
    usersModel?: {
      userGroups?: [ string ](name='UserGroups'),
      users?: [ string ](name='Users'),
    }(name='UsersModel'),
  }(name='Result'),
  success?: boolean(name='Success', example='true'),
}

model ListDataLevelPermissionWhiteListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListDataLevelPermissionWhiteListResponseBody(name='body'),
}

/**
 * @summary 根据行列权限种类，获取数据集行列权限的白名单列表。
 *
 * @param request ListDataLevelPermissionWhiteListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListDataLevelPermissionWhiteListResponse
 */
async function listDataLevelPermissionWhiteListWithOptions(request: ListDataLevelPermissionWhiteListRequest, runtime: Util.RuntimeOptions): ListDataLevelPermissionWhiteListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.cubeId)) {
    query['CubeId'] = request.cubeId;
  }
  if (!Util.isUnset(request.ruleType)) {
    query['RuleType'] = request.ruleType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListDataLevelPermissionWhiteList',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 根据行列权限种类，获取数据集行列权限的白名单列表。
 *
 * @param request ListDataLevelPermissionWhiteListRequest
 * @return ListDataLevelPermissionWhiteListResponse
 */
async function listDataLevelPermissionWhiteList(request: ListDataLevelPermissionWhiteListRequest): ListDataLevelPermissionWhiteListResponse {
  var runtime = new Util.RuntimeOptions{};
  return listDataLevelPermissionWhiteListWithOptions(request, runtime);
}

model ListDataSourceRequest {
  dsType?: string(name='DsType', description='Data source type.', example='mysql'),
  workspaceId?: string(name='WorkspaceId', description='Workspace ID.

This parameter is required.', example='95296e95-******c7d-8af9-dedf0ad0****'),
}

model ListDataSourceResponseBody = {
  requestId?: string(name='RequestId', description='Request ID.', example='7FC9A6A6-****-5CED-B*****E891E4075'),
  result?: [ 
    {
      creatorId?: string(name='CreatorId', description='Quick BI user ID of the creator.', example='281*****-485******-8'),
      creatorName?: string(name='CreatorName', description='Owner\\\\"s nickname.', example='system'),
      datasourceId?: string(name='DatasourceId', description='Data source ID.', example='7FC9A6A6-****-5CED-B*****E891E4075'),
      dsType?: string(name='DsType', description='Data source type.', example='odps'),
      gmtCreate?: string(name='GmtCreate', description='Creation time of the data source, in yyyy-MM-dd HH:mm:ss format.', example='2024-04-16 13:17:39'),
      gmtModified?: string(name='GmtModified', description='Modification time.', example='2024-08-15 10:06:31'),
      parentDsType?: string(name='ParentDsType', description='Primary data source type for multi-engine data sources.', example='dataphin'),
      showName?: string(name='ShowName', description='Display name of the data source.', example='0327'),
    }
  ](name='Result', description='Array of data source information.'),
  success?: boolean(name='Success', description='Whether the request was successful.', example='true'),
}

model ListDataSourceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListDataSourceResponseBody(name='body'),
}

/**
 * @summary Query all data sources under the specified space
 *
 * @param request ListDataSourceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListDataSourceResponse
 */
async function listDataSourceWithOptions(request: ListDataSourceRequest, runtime: Util.RuntimeOptions): ListDataSourceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.dsType)) {
    query['DsType'] = request.dsType;
  }
  if (!Util.isUnset(request.workspaceId)) {
    query['WorkspaceId'] = request.workspaceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListDataSource',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Query all data sources under the specified space
 *
 * @param request ListDataSourceRequest
 * @return ListDataSourceResponse
 */
async function listDataSource(request: ListDataSourceRequest): ListDataSourceResponse {
  var runtime = new Util.RuntimeOptions{};
  return listDataSourceWithOptions(request, runtime);
}

model ListFavoriteReportsRequest {
  keyword?: string(name='Keyword'),
  pageSize?: int32(name='PageSize', example='10'),
  treeType?: string(name='TreeType', example='PAGE'),
  userId?: string(name='UserId', description='This parameter is required.', example='b5d8fd9348cc4327****afb604'),
}

model ListFavoriteReportsResponseBody = {
  requestId?: string(name='RequestId', example='D787E1A3-A93C-424A-B626-C2B05DF8D885'),
  result?: {
    data?: [ 
      {
        favorite?: boolean(name='Favorite', example='true'),
        favoriteDate?: string(name='FavoriteDate'),
        gmtCreate?: string(name='GmtCreate', example='1640088615000'),
        gmtModified?: string(name='GmtModified', example='1640595729000'),
        hasEditAuth?: boolean(name='HasEditAuth', example='true'),
        hasViewAuth?: boolean(name='HasViewAuth', example='true'),
        name?: string(name='Name'),
        ownerName?: string(name='OwnerName'),
        ownerNum?: string(name='OwnerNum', example='1365*****238860'),
        publishStatus?: int32(name='PublishStatus', example='1'),
        treeId?: string(name='TreeId', example='977c7698-****-****-****-44b7304d20fc'),
        type?: string(name='Type', example='PAGE'),
        workspaceId?: string(name='WorkspaceId', example='523793cb-****-****-****-aa71c65ffa39'),
        workspaceName?: string(name='WorkspaceName'),
      }
    ](name='Data'),
    pageNum?: int32(name='PageNum', example='1'),
    pageSize?: int32(name='PageSize', example='10'),
    totalNum?: int32(name='TotalNum', example='1'),
    totalPages?: int32(name='TotalPages', example='1'),
  }(name='Result'),
  success?: boolean(name='Success', example='true'),
}

model ListFavoriteReportsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListFavoriteReportsResponseBody(name='body'),
}

/**
 * @summary 获取指定用户在首页看板中展示的收藏作品列表。
 *
 * @param request ListFavoriteReportsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListFavoriteReportsResponse
 */
async function listFavoriteReportsWithOptions(request: ListFavoriteReportsRequest, runtime: Util.RuntimeOptions): ListFavoriteReportsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.keyword)) {
    query['Keyword'] = request.keyword;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.treeType)) {
    query['TreeType'] = request.treeType;
  }
  if (!Util.isUnset(request.userId)) {
    query['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListFavoriteReports',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 获取指定用户在首页看板中展示的收藏作品列表。
 *
 * @param request ListFavoriteReportsRequest
 * @return ListFavoriteReportsResponse
 */
async function listFavoriteReports(request: ListFavoriteReportsRequest): ListFavoriteReportsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listFavoriteReportsWithOptions(request, runtime);
}

model ListOrganizationRoleUsersRequest {
  keyword?: string(name='Keyword', description='Keyword for the nickname of the organization member.', example='zhangsan'),
  pageNum?: int32(name='PageNum', description='Page number.

- Default value is 1.', example='1'),
  pageSize?: int32(name='PageSize', description='Number of items per page.
- Default value is 10.', example='10'),
  roleId?: long(name='RoleId', description='Organization role ID, including predefined roles and custom roles:

- Organization Administrator (predefined role): 111111111
- Permission Administrator (predefined role): 111111112
- Regular User (predefined role): 111111113
- Custom Role: The corresponding role ID for a custom role

This parameter is required.', example='111111111'),
}

model ListOrganizationRoleUsersResponseBody = {
  requestId?: string(name='RequestId', description='Request ID.', example='BCE45E6D-****-4F94-86BB-****2B1615FF'),
  result?: {
    data?: [ 
      {
        nickName?: string(name='NickName', description='Nickname of the organization member.', example='Test User'),
        userId?: string(name='UserId', description='UserID of the organization member in Quick BI.', example='b5d8fd9348cc4327****afb604'),
      }
    ](name='Data', description='User list.'),
    pageNum?: int32(name='PageNum', description='Page number.', example='10'),
    pageSize?: int32(name='PageSize', description='Number of items per page as set in the request.', example='1'),
    totalNum?: int32(name='TotalNum', description='Total number of items.', example='10'),
    totalPages?: int32(name='TotalPages', description='Total number of pages.', example='1'),
  }(name='Result', description='Returns the list of users under the organization role.'),
  success?: boolean(name='Success', description='Indicates whether the request was successful. Possible values:
- true: Request succeeded
- false: Request failed', example='true'),
}

model ListOrganizationRoleUsersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListOrganizationRoleUsersResponseBody(name='body'),
}

/**
 * @summary Get user list under the specified organization role.
 *
 * @param request ListOrganizationRoleUsersRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListOrganizationRoleUsersResponse
 */
async function listOrganizationRoleUsersWithOptions(request: ListOrganizationRoleUsersRequest, runtime: Util.RuntimeOptions): ListOrganizationRoleUsersResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.keyword)) {
    query['Keyword'] = request.keyword;
  }
  if (!Util.isUnset(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.roleId)) {
    query['RoleId'] = request.roleId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListOrganizationRoleUsers',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Get user list under the specified organization role.
 *
 * @param request ListOrganizationRoleUsersRequest
 * @return ListOrganizationRoleUsersResponse
 */
async function listOrganizationRoleUsers(request: ListOrganizationRoleUsersRequest): ListOrganizationRoleUsersResponse {
  var runtime = new Util.RuntimeOptions{};
  return listOrganizationRoleUsersWithOptions(request, runtime);
}

model ListOrganizationRolesResponseBody = {
  requestId?: string(name='RequestId', description='Request ID.', example='7AAB95D7-2E11-4FE2-94BC-858E4FC0C976'),
  result?: [ 
    {
      authConfigList?: [ 
        {
          authKey?: string(name='AuthKey', description='Permission type:
- quick_monitor: Metric monitoring
- subscription: Subscription management
- offline_download: Self-service data retrieval
- resource_package: Resource package management
- organization_ask: Organization identification code (AK/SK)
- developer_openapi: Open API
- data_service: Data service
- admin_authorize3rd: Embedded analysis
- component_manage: Custom component
- template_open: Custom template
- custom_driver: Custom driver (supported only in standalone deployment)
- open_platform_custom_plugin: Custom plugin (supported only in standalone deployment)
- enterprise_safety: Enterprise security', example='enterprise_safety'),
        }
      ](name='AuthConfigList', description='List of role permission configurations.'),
      isSystemRole?: boolean(name='IsSystemRole', description='Whether it is a predefined role. Possible values:
- true: Yes
- false: No', example='true'),
      roleId?: long(name='RoleId', description='Role ID.', example='111111111'),
      roleName?: string(name='RoleName', description='Role name.', example='Organization Admin'),
    }
  ](name='Result', description='Returns the list of organization roles.'),
  success?: boolean(name='Success', description='是否请求成功。取值范围：
- true：请求成功
- false：请求失败', example='true'),
}

model ListOrganizationRolesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListOrganizationRolesResponseBody(name='body'),
}

/**
 * @summary Retrieve the list of custom roles at the organization level.
 *
 * @param request ListOrganizationRolesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListOrganizationRolesResponse
 */
async function listOrganizationRolesWithOptions(runtime: Util.RuntimeOptions): ListOrganizationRolesResponse {
  var req = new OpenApi.OpenApiRequest{};
  var params = new OpenApi.Params{
    action = 'ListOrganizationRoles',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Retrieve the list of custom roles at the organization level.
 *
 * @return ListOrganizationRolesResponse
 */
async function listOrganizationRoles(): ListOrganizationRolesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listOrganizationRolesWithOptions(runtime);
}

model ListPortalMenuAuthorizationRequest {
  dataPortalId?: string(name='DataPortalId', description='The ID of the BI portal.

This parameter is required.', example='0d173abb53e84c8ca7495429163b****'),
}

model ListPortalMenuAuthorizationResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='D8749D65-E80A-433C-AF1B-CE9C180FF3B4'),
  result?: [ 
    {
      menuId?: string(name='MenuId', description='The menu ID of the BI portal leaf node.', example='54kqgoa****'),
      receivers?: [ 
        {
          receiverId?: string(name='ReceiverId', description='The ID of the authorization object.', example='121344444790****'),
          receiverType?: int32(name='ReceiverType', description='The type of the authorization object. Valid values:

*   0: user
*   1: user group', example='0'),
        }
      ](name='Receivers', description='The details of the object to which the menu is authorized.'),
      showOnlyWithAccess?: boolean(name='ShowOnlyWithAccess', description='Whether only authorization is visible. Valid values:

*   true: Only the authorization is visible.
*   false: Both are visible.', example='true'),
    }
  ](name='Result', description='The list of authorization details of the portal menu.'),
  success?: boolean(name='Success', description='Indicates whether the request is successful. Valid values:

*   true: The request was successful.
*   false: The request failed.', example='true'),
}

model ListPortalMenuAuthorizationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListPortalMenuAuthorizationResponseBody(name='body'),
}

/**
 * @summary Obtains the list of authorization details for a BI portal menu.
 *
 * @param request ListPortalMenuAuthorizationRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListPortalMenuAuthorizationResponse
 */
async function listPortalMenuAuthorizationWithOptions(request: ListPortalMenuAuthorizationRequest, runtime: Util.RuntimeOptions): ListPortalMenuAuthorizationResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.dataPortalId)) {
    query['DataPortalId'] = request.dataPortalId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListPortalMenuAuthorization',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Obtains the list of authorization details for a BI portal menu.
 *
 * @param request ListPortalMenuAuthorizationRequest
 * @return ListPortalMenuAuthorizationResponse
 */
async function listPortalMenuAuthorization(request: ListPortalMenuAuthorizationRequest): ListPortalMenuAuthorizationResponse {
  var runtime = new Util.RuntimeOptions{};
  return listPortalMenuAuthorizationWithOptions(request, runtime);
}

model ListPortalMenusRequest {
  dataPortalId?: string(name='DataPortalId', description='The ID of the BI portal.

This parameter is required.', example='0d173abb53e84c8ca7495429163b****'),
  userId?: string(name='UserId', description='The user ID in the Quick BI. When passed in, the list displays only the menus that the user has permissions on.', example='1234567***'),
}

model ListPortalMenusResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='75912036-5527-4B7E-9265-B481D6651AC2'),
  result?: string(name='Result', description='A JSON string that levels the details of the portal menu list. Valid values:

*   menuType: the type of the menu.

    *   0: dashboard
    *   1: outer chain
    *   2: workbook
    *   4: directory folder
    *   5: form filling
    *   6: self-service data retrieval

*   menuId: menu ID

*   uri: ID or URL of the resource associated with the menu

*   showOnlyWithAccess: Authorized Only Visible

*   menuName: menu display name

*   dependentPermisson: whether the report resource associated with the menu has permissions

*   children: submenu', example='[{"children":[{"children":[{"children":[{"menuId":"54kqgoa\\\\*\\\\*\\\\*\\\\*","menuName":"Report menu","menuType":0,"showOnlyWithAccess":true,"dependentPermisson":false,"uri":"e5da4a3f-d7f9-4262-a39e-a840043c\\\\*\\\\*\\\\*\\\\*"},{\\\\*\\\\*\\\\*\\\\* "menu1nId":"pName" 135 "Directory menu","menuType":4,"showOnlyWithAccess":false,"dependentPermisson":true}],"menuId":"23a7d5d8-e55a-4737-b6a1-3c585505\\\\*\\\\*\\\\*\\\\*","menuName":"pop level -3 menu","menuType":4,"showOnlyWithAccess":true,"dependentPermisson":true}],"menuId":"80764 f3c-affd-45a1-aaa1-bb039d8a\\\\*\\\\*\\\\*\\\\*","menuName":"pop menu","menuType":4,"showOnlyWithAccess":false,"dependentPermisson":true}],"menuId":"277 f968a-22 ff-4ce6-83f0-a82950f4\\\\*\\\\*\\\\*\\\\*","menuName":"pop menu","menuType":4,"showOnlyWithAccess":false,"dependentPermisson":true}]'),
  success?: boolean(name='Success', description='Indicates whether the request is successful. Valid values:

*   true: The request was successful.
*   false: The request failed.', example='true'),
}

model ListPortalMenusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListPortalMenusResponseBody(name='body'),
}

/**
 * @summary Gets a hierarchical list of menus under a specific BI portal.
 *
 * @param request ListPortalMenusRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListPortalMenusResponse
 */
async function listPortalMenusWithOptions(request: ListPortalMenusRequest, runtime: Util.RuntimeOptions): ListPortalMenusResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.dataPortalId)) {
    query['DataPortalId'] = request.dataPortalId;
  }
  if (!Util.isUnset(request.userId)) {
    query['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListPortalMenus',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Gets a hierarchical list of menus under a specific BI portal.
 *
 * @param request ListPortalMenusRequest
 * @return ListPortalMenusResponse
 */
async function listPortalMenus(request: ListPortalMenusRequest): ListPortalMenusResponse {
  var runtime = new Util.RuntimeOptions{};
  return listPortalMenusWithOptions(request, runtime);
}

model ListRecentViewReportsRequest {
  keyword?: string(name='Keyword'),
  offsetDay?: int32(name='OffsetDay', example='10'),
  pageSize?: int32(name='PageSize', example='10'),
  queryMode?: string(name='QueryMode', example='1'),
  treeType?: string(name='TreeType', example='PAGE'),
  userId?: string(name='UserId', description='This parameter is required.', example='b5d8fd9348cc4327****afb604'),
}

model ListRecentViewReportsResponseBody = {
  requestId?: string(name='RequestId', example='D787E1A3-A93C-424A-B626-C2B05DF8D885'),
  result?: {
    attention?: string(name='Attention', example='当前API返回的分页参数如TotalNum等即将下线，如有使用请及时修改'),
    data?: [ 
      {
        favorite?: boolean(name='Favorite', example='true'),
        gmtCreate?: string(name='GmtCreate', example='1496651577000'),
        gmtModified?: string(name='GmtModified', example='1640595729000'),
        hasEditAuth?: boolean(name='HasEditAuth', example='true'),
        hasViewAuth?: boolean(name='HasViewAuth', example='true'),
        latestViewTime?: string(name='LatestViewTime', example='1642067498000'),
        name?: string(name='Name'),
        ownerName?: string(name='OwnerName'),
        ownerNum?: string(name='OwnerNum', example='1365*****238860'),
        publishStatus?: int32(name='PublishStatus', example='1'),
        treeId?: string(name='TreeId', example='977c7698-****-****-****-44b7304d20fc'),
        type?: string(name='Type', example='PAGE'),
        viewCount?: long(name='ViewCount', example='7'),
        workspaceId?: string(name='WorkspaceId', example='523793cb-****-****-****-aa71c65ffa39'),
        workspaceName?: string(name='WorkspaceName'),
      }
    ](name='Data'),
    pageNum?: int32(name='PageNum', example='1'),
    pageSize?: int32(name='PageSize', example='10'),
    totalNum?: int32(name='TotalNum', example='1'),
    totalPages?: int32(name='TotalPages', example='1'),
  }(name='Result'),
  success?: boolean(name='Success', example='true'),
}

model ListRecentViewReportsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListRecentViewReportsResponseBody(name='body'),
}

/**
 * @summary 获取首页看板常看和足迹列表。
 *
 * @param request ListRecentViewReportsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListRecentViewReportsResponse
 */
async function listRecentViewReportsWithOptions(request: ListRecentViewReportsRequest, runtime: Util.RuntimeOptions): ListRecentViewReportsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.keyword)) {
    query['Keyword'] = request.keyword;
  }
  if (!Util.isUnset(request.offsetDay)) {
    query['OffsetDay'] = request.offsetDay;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.queryMode)) {
    query['QueryMode'] = request.queryMode;
  }
  if (!Util.isUnset(request.treeType)) {
    query['TreeType'] = request.treeType;
  }
  if (!Util.isUnset(request.userId)) {
    query['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListRecentViewReports',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 获取首页看板常看和足迹列表。
 *
 * @param request ListRecentViewReportsRequest
 * @return ListRecentViewReportsResponse
 */
async function listRecentViewReports(request: ListRecentViewReportsRequest): ListRecentViewReportsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listRecentViewReportsWithOptions(request, runtime);
}

model ListSharedReportsRequest {
  keyword?: string(name='Keyword'),
  pageSize?: int32(name='PageSize', example='10'),
  treeType?: string(name='TreeType', example='PAGE'),
  userId?: string(name='UserId', description='This parameter is required.', example='b5d8fd9348cc4327****afb604'),
}

model ListSharedReportsResponseBody = {
  requestId?: string(name='RequestId', example='D787E1A3-A93C-424A-B626-C2B05DF8D885'),
  result?: {
    data?: [ 
      {
        favorite?: boolean(name='Favorite', example='true'),
        gmtCreate?: string(name='GmtCreate', example='1640088615000'),
        gmtModified?: string(name='GmtModified', example='1644373980000'),
        hasEditAuth?: boolean(name='HasEditAuth', example='true'),
        hasViewAuth?: boolean(name='HasViewAuth', example='true'),
        name?: string(name='Name'),
        ownerName?: string(name='OwnerName'),
        ownerNum?: string(name='OwnerNum', example='1365*****238860'),
        publishStatus?: int32(name='PublishStatus', example='1'),
        treeId?: string(name='TreeId', example='977c7698-****-****-****-44b7304d20fc'),
        type?: string(name='Type', example='PAGE'),
        workspaceId?: string(name='WorkspaceId', example='gfidm145-****-****-9426-8f93be23****'),
        workspaceName?: string(name='WorkspaceName'),
      }
    ](name='Data'),
    pageNum?: int32(name='PageNum', example='1'),
    pageSize?: int32(name='PageSize', example='10'),
    totalNum?: int32(name='TotalNum', example='1'),
    totalPages?: int32(name='TotalPages', example='1'),
  }(name='Result'),
  success?: boolean(name='Success', example='true'),
}

model ListSharedReportsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListSharedReportsResponseBody(name='body'),
}

/**
 * @summary 获取指定用户在首页看板中展示的被授权的作品列表。
 *
 * @param request ListSharedReportsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListSharedReportsResponse
 */
async function listSharedReportsWithOptions(request: ListSharedReportsRequest, runtime: Util.RuntimeOptions): ListSharedReportsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.keyword)) {
    query['Keyword'] = request.keyword;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.treeType)) {
    query['TreeType'] = request.treeType;
  }
  if (!Util.isUnset(request.userId)) {
    query['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListSharedReports',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 获取指定用户在首页看板中展示的被授权的作品列表。
 *
 * @param request ListSharedReportsRequest
 * @return ListSharedReportsResponse
 */
async function listSharedReports(request: ListSharedReportsRequest): ListSharedReportsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listSharedReportsWithOptions(request, runtime);
}

model ListUserGroupsByUserIdRequest {
  userId?: string(name='UserId', description='The ID of the user group.

This parameter is required.', example='46e5374665ba4b679ee22e2a2927****'),
}

model ListUserGroupsByUserIdResponseBody = {
  requestId?: string(name='RequestId', example='E2440604-3059-561A-AD68-DEDBC870EB2B'),
  result?: [ 
    {
      createTime?: string(name='CreateTime', example='2021-03-15 17:13:55'),
      createUser?: string(name='CreateUser', example='46e5374665ba4b679ee22e2a2927****'),
      identifiedPath?: string(name='IdentifiedPath'),
      modifiedTime?: string(name='ModifiedTime', example='2021-03-15 20:36:40'),
      modifyUser?: string(name='ModifyUser', example='46e5374665ba4b679ee22e2a2927****'),
      parentUsergroupId?: string(name='ParentUsergroupId', example='2fe4fbd8-588f-489a-b3e1-e92c7af0****'),
      usergroupDesc?: string(name='UsergroupDesc'),
      usergroupId?: string(name='UsergroupId', example='34fd141d-4598-4093-8c33-8e066dcb****'),
      usergroupName?: string(name='UsergroupName'),
    }
  ](name='Result'),
  success?: boolean(name='Success', description='The user group modifier. The UserID of the Quick BI is used instead of the UID of Alibaba Cloud.', example='true'),
}

model ListUserGroupsByUserIdResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListUserGroupsByUserIdResponseBody(name='body'),
}

/**
 * @summary Description
 *
 * @param request ListUserGroupsByUserIdRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListUserGroupsByUserIdResponse
 */
async function listUserGroupsByUserIdWithOptions(request: ListUserGroupsByUserIdRequest, runtime: Util.RuntimeOptions): ListUserGroupsByUserIdResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.userId)) {
    query['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListUserGroupsByUserId',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Description
 *
 * @param request ListUserGroupsByUserIdRequest
 * @return ListUserGroupsByUserIdResponse
 */
async function listUserGroupsByUserId(request: ListUserGroupsByUserIdRequest): ListUserGroupsByUserIdResponse {
  var runtime = new Util.RuntimeOptions{};
  return listUserGroupsByUserIdWithOptions(request, runtime);
}

model ListWorkspaceRoleUsersRequest {
  keyword?: string(name='Keyword', description='Keyword for the user\\\\"s nickname.', example='测试pop用户'),
  pageNum?: int32(name='PageNum', description='Current page number for pagination:

- Starting value: 1
- Default value: 1', example='1'),
  pageSize?: int32(name='PageSize', description='Number of items per page for pagination:

- Default value: 10
- Maximum value: 1000', example='10'),
  roleId?: long(name='RoleId', description='Workspace role ID, including predefined roles and custom roles:

- 25: Workspace Administrator (predefined role)
- 26: Developer (predefined role)
- 27: Analyst (predefined role)
- 30: Viewer (predefined role)
- Custom roles: The corresponding role ID for custom roles

This parameter is required.', example='25'),
  workspaceId?: string(name='WorkspaceId', description='Workspace ID.', example='726bee5a-****-43e1-9a8e-b550f0120f35'),
}

model ListWorkspaceRoleUsersResponseBody = {
  requestId?: string(name='RequestId', description='Request ID.', example='D787E1A3-A93C-424A-B626-C2B05DF8D885'),
  result?: {
    data?: [ 
      {
        nickName?: string(name='NickName', description='Nickname of the organization member.', example='Test user'),
        userId?: string(name='UserId', description='UserID of the organization member in Quick BI.', example='b5d8fd9348cc4327****afb604'),
        workspaceId?: string(name='WorkspaceId', description='Workspace ID.', example='7350a155-0e94-4c6c-8620-57bbec38****'),
        workspaceName?: string(name='WorkspaceName', description='Workspace name.', example='Test space'),
      }
    ](name='Data', description='User list.'),
    pageNum?: int32(name='PageNum', description='Page number.', example='1'),
    pageSize?: int32(name='PageSize', description='Number of items per page as set in the request.', example='10'),
    totalNum?: int32(name='TotalNum', description='Total number of items.', example='1'),
    totalPages?: int32(name='TotalPages', description='Total number of pages.', example='1'),
  }(name='Result', description='Returns the list of users under the specified workspace role.'),
  success?: boolean(name='Success', description='是否请求成功。取值范围：
- true：请求成功
- false：请求失败', example='true'),
}

model ListWorkspaceRoleUsersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListWorkspaceRoleUsersResponseBody(name='body'),
}

/**
 * @summary Get user list under the specified workspace role.
 *
 * @param request ListWorkspaceRoleUsersRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListWorkspaceRoleUsersResponse
 */
async function listWorkspaceRoleUsersWithOptions(request: ListWorkspaceRoleUsersRequest, runtime: Util.RuntimeOptions): ListWorkspaceRoleUsersResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.keyword)) {
    query['Keyword'] = request.keyword;
  }
  if (!Util.isUnset(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.roleId)) {
    query['RoleId'] = request.roleId;
  }
  if (!Util.isUnset(request.workspaceId)) {
    query['WorkspaceId'] = request.workspaceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListWorkspaceRoleUsers',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Get user list under the specified workspace role.
 *
 * @param request ListWorkspaceRoleUsersRequest
 * @return ListWorkspaceRoleUsersResponse
 */
async function listWorkspaceRoleUsers(request: ListWorkspaceRoleUsersRequest): ListWorkspaceRoleUsersResponse {
  var runtime = new Util.RuntimeOptions{};
  return listWorkspaceRoleUsersWithOptions(request, runtime);
}

model ListWorkspaceRolesRequest {
  workspaceId?: string(name='WorkspaceId', description='Workspace ID.

This parameter is required.', example='95296e95-ca89-4c7d-8af9-dedf0ad0****'),
}

model ListWorkspaceRolesResponseBody = {
  requestId?: string(name='RequestId', description='Request ID.', example='D787E1A3-A93C-424A-B626-C2B05DF8D885'),
  result?: [ 
    {
      authConfigList?: [ 
        {
          actionAuthKeys?: [ string ](name='ActionAuthKeys', description='Authorization scope.'),
          authKey?: string(name='AuthKey', description='Authorization type:
- portal_create: Data Portal
- dashboard_create: Dashboard
- report_create: Spreadsheet
- screen_create: Data Screen
- analysis: Ad-hoc Analysis
- offline_download: Self-service Data Retrieval
- data_form: Data Entry
- quick_etl: Data Preparation
- cube: Dataset
- datasource: Data Source', example='portal_create'),
        }
      ](name='AuthConfigList', description='List of role authorization configurations.'),
      isSystemRole?: boolean(name='IsSystemRole', description='Whether it is a predefined role. Value range:

- true: Yes
- false: No', example='true'),
      roleId?: long(name='RoleId', description='Workspace role ID, including predefined and custom roles:

- 25: Workspace Administrator (predefined role)
- 26: Developer (predefined role)
- 27: Analyst (predefined role)
- 30: Viewer (predefined role)
- Custom role: The corresponding role ID for a custom role', example='25'),
      roleName?: string(name='RoleName', description='Role name.', example='Space administrator'),
    }
  ](name='Result', description='List of workspace roles.'),
  success?: boolean(name='Success', description='Indicates whether the request was successful. Possible values:
- true: The request was successful. 
- false: The request failed.', example='true'),
}

model ListWorkspaceRolesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListWorkspaceRolesResponseBody(name='body'),
}

/**
 * @summary Get the list of workspace roles.
 *
 * @param request ListWorkspaceRolesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListWorkspaceRolesResponse
 */
async function listWorkspaceRolesWithOptions(request: ListWorkspaceRolesRequest, runtime: Util.RuntimeOptions): ListWorkspaceRolesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.workspaceId)) {
    query['WorkspaceId'] = request.workspaceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListWorkspaceRoles',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Get the list of workspace roles.
 *
 * @param request ListWorkspaceRolesRequest
 * @return ListWorkspaceRolesResponse
 */
async function listWorkspaceRoles(request: ListWorkspaceRolesRequest): ListWorkspaceRolesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listWorkspaceRolesWithOptions(request, runtime);
}

model ManualRunMailTaskRequest {
  mailId?: string(name='MailId', description='The ID of the email task in the subscription management interface.

This parameter is required.', example='3423423sdfa****sdadw'),
}

model ManualRunMailTaskResponseBody = {
  requestId?: string(name='RequestId', description='Request ID.', example='a4d1a221d-41za1-****'),
  result?: boolean(name='Result', description='Indicates whether the execution was successful.', example='true'),
  success?: boolean(name='Success', description='Indicates whether the request was successful. Value range:
- true: The request succeeded 
- false: The request failed', example='true'),
}

model ManualRunMailTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ManualRunMailTaskResponseBody(name='body'),
}

/**
 * @summary Manually Execute Email Task
 *
 * @param request ManualRunMailTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ManualRunMailTaskResponse
 */
async function manualRunMailTaskWithOptions(request: ManualRunMailTaskRequest, runtime: Util.RuntimeOptions): ManualRunMailTaskResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.mailId)) {
    query['MailId'] = request.mailId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ManualRunMailTask',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Manually Execute Email Task
 *
 * @param request ManualRunMailTaskRequest
 * @return ManualRunMailTaskResponse
 */
async function manualRunMailTask(request: ManualRunMailTaskRequest): ManualRunMailTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return manualRunMailTaskWithOptions(request, runtime);
}

model ModifyApiDatasourceParametersRequest {
  apiId?: string(name='ApiId', description='The ID of the API data source.

This parameter is required.', example='b66a66de51f24d149116c17718138194'),
  parameters?: string(name='Parameters', description='The configuration of API data parameters in the JSONArray format. You can modify a maximum of 10 parameters.

*   name: the name of a common parameter or a parameter in a query statement
*   value: the value of a common parameter or a parameter in a query statement.

This parameter is required.', example='[{"name":"token","value":"xxxxxxxxxxxx"},{"name":"pageSize","value":100}]'),
  workspaceId?: string(name='WorkspaceId', description='The workspace ID.

This parameter is required.', example='726bee5a-****-43e1-9a8e-b550f0120f35'),
}

model ModifyApiDatasourceParametersResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='D8749D65-E80A-433C-AF1B-CE9C180FF3B4'),
  result?: boolean(name='Result', description='The execution result of the interface. Valid values:

*   true: The request was successful.
*   false: The request failed.', example='true'),
  success?: boolean(name='Success', description='Indicates whether the request was successful. Valid values:

*   true: The request was successful.
*   false: The request failed.', example='true'),
}

model ModifyApiDatasourceParametersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyApiDatasourceParametersResponseBody(name='body'),
}

/**
 * @summary Modifies the configurations of a specified API data source.
 *
 * @description When you modify a query statement, you can modify only the top-level JsonObject. You cannot modify parameters that are nested in multiple layers. For more information about the parameters, see [Create an API data source](https://help.aliyun.com/document_detail/409330.html).
 *
 * @param request ModifyApiDatasourceParametersRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyApiDatasourceParametersResponse
 */
async function modifyApiDatasourceParametersWithOptions(request: ModifyApiDatasourceParametersRequest, runtime: Util.RuntimeOptions): ModifyApiDatasourceParametersResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiId)) {
    query['ApiId'] = request.apiId;
  }
  if (!Util.isUnset(request.parameters)) {
    query['Parameters'] = request.parameters;
  }
  if (!Util.isUnset(request.workspaceId)) {
    query['WorkspaceId'] = request.workspaceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyApiDatasourceParameters',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Modifies the configurations of a specified API data source.
 *
 * @description When you modify a query statement, you can modify only the top-level JsonObject. You cannot modify parameters that are nested in multiple layers. For more information about the parameters, see [Create an API data source](https://help.aliyun.com/document_detail/409330.html).
 *
 * @param request ModifyApiDatasourceParametersRequest
 * @return ModifyApiDatasourceParametersResponse
 */
async function modifyApiDatasourceParameters(request: ModifyApiDatasourceParametersRequest): ModifyApiDatasourceParametersResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyApiDatasourceParametersWithOptions(request, runtime);
}

model ModifyCopilotEmbedConfigRequest {
  agentName?: string(name='AgentName'),
  copilotId?: string(name='CopilotId', description='This parameter is required.', example='ccd3428c-dd2xxxxxxxxxxxxdffee'),
  dataRange?: string(name='DataRange', example='Map<String,Object> data=new HashMap<>();
        data.put("allTheme",true);
        //data.put("allCube",true);
        //data.put("themes",Lists.newArrayList("1111","22222"));
        //data.put("llmCubes",Lists.newArrayList("33333","44444"));
        request.setDataRange(JSON.toJSONString(data));'),
  moduleName?: string(name='ModuleName'),
}

model ModifyCopilotEmbedConfigResponseBody = {
  requestId?: string(name='RequestId', example='4BAA4694-CC27-555F-B15A-688AA9289FEE'),
  result?: boolean(name='Result', example='true'),
  success?: boolean(name='Success', example='true'),
}

model ModifyCopilotEmbedConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyCopilotEmbedConfigResponseBody(name='body'),
}

/**
 * @summary 修改智能问数嵌入配置。
 *
 * @param request ModifyCopilotEmbedConfigRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyCopilotEmbedConfigResponse
 */
async function modifyCopilotEmbedConfigWithOptions(request: ModifyCopilotEmbedConfigRequest, runtime: Util.RuntimeOptions): ModifyCopilotEmbedConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.agentName)) {
    query['AgentName'] = request.agentName;
  }
  if (!Util.isUnset(request.copilotId)) {
    query['CopilotId'] = request.copilotId;
  }
  if (!Util.isUnset(request.dataRange)) {
    query['DataRange'] = request.dataRange;
  }
  if (!Util.isUnset(request.moduleName)) {
    query['ModuleName'] = request.moduleName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyCopilotEmbedConfig',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 修改智能问数嵌入配置。
 *
 * @param request ModifyCopilotEmbedConfigRequest
 * @return ModifyCopilotEmbedConfigResponse
 */
async function modifyCopilotEmbedConfig(request: ModifyCopilotEmbedConfigRequest): ModifyCopilotEmbedConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyCopilotEmbedConfigWithOptions(request, runtime);
}

model QueryApprovalInfoRequest {
  page?: int32(name='Page', description='Page number, default is 1.', example='1'),
  pageSize?: int32(name='PageSize', description='Number of rows per page, default is 1000.', example='1000'),
  status?: int32(name='Status', description='Approval status:
- 0: Pending
- 1: Processed

This parameter is required.', example='0'),
  userId?: string(name='UserId', description='Current approver user ID, qbi user ID.

This parameter is required.', example='12352fasdavsa'),
}

model QueryApprovalInfoResponseBody = {
  requestId?: string(name='RequestId', description='Request ID.', example='D787E1A3-A93C-424A-B626-C2B05DF8D885'),
  result?: {
    data?: [ 
      {
        applicantId?: string(name='ApplicantId', description='Applicant\\\\"s user ID, qbi user ID.', example='1359508'),
        applicantName?: string(name='ApplicantName', description='Applicant\\\\"s nickname.', example='Li Fei'),
        applicationId?: string(name='ApplicationId', description='Application ID.', example='64813ef6da58e80eef8ed2f9'),
        applyReason?: string(name='ApplyReason', description='Application reason.', example='Development needs'),
        approverId?: string(name='ApproverId', description='Approver\\\\"s user ID, qbi user ID.', example='sdasascasxasd'),
        approverName?: string(name='ApproverName', description='Approver\\\\"s nickname.', example='data_fusion_002'),
        deleteFlag?: boolean(name='DeleteFlag', description='Whether the resource has been deleted:
- true: Deleted
- false: Not deleted', example='true'),
        expireDate?: long(name='ExpireDate', description='Permission expiration date, timestamp.', example='1708568097135'),
        flagStatus?: int32(name='FlagStatus', description='Permission approval status:
- 0: Under review, corresponding to 0 in the request parameters
- 1: Approved, corresponding to 1 in the request parameters
- 2: Rejected, corresponding to 1 in the request parameters', example='0'),
        gmtCreate?: long(name='GmtCreate', description='Application creation time, timestamp.', example='1687315758'),
        gmtModified?: long(name='GmtModified', description='Application modification time, timestamp.', example='1640595729000'),
        handleReason?: string(name='HandleReason', description='Handling reason.', example='Development needs'),
        resourceId?: string(name='ResourceId', description='The ID of the resource for which permission is requested.', example='acl-ct4t2e4u2x4ej1bzur'),
        resourceName?: string(name='ResourceName', description='The name of the resource for which permission is requested (e.g., report name, space name...).', example='Test Resources'),
        resourceType?: string(name='ResourceType', description='The type of the resource.', example='DASHBOARD'),
        workspaceName?: string(name='WorkspaceName', description='The name of the workspace.', example='Test Workspace'),
      }
    ](name='Data', description='Array of approval flow information.'),
    page?: int32(name='Page', description='The current page number.', example='1'),
    pageSize?: int32(name='PageSize', description='The number of records requested per page.', example='1000'),
    start?: int32(name='Start', description='The starting position of the current page.', example='0'),
    total?: int32(name='Total', description='The total number of items.', example='3'),
    totalPages?: int32(name='TotalPages', description='The total number of pages.', example='1'),
  }(name='Result', description='Return the result of the interface execution.'),
  success?: boolean(name='Success', description='Indicates whether the API call was successful. Possible values are:
- true: success
- false: failure', example='true'),
}

model QueryApprovalInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryApprovalInfoResponseBody(name='body'),
}

/**
 * @summary Get approval flow information based on the approver.
 *
 * @param request QueryApprovalInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryApprovalInfoResponse
 */
async function queryApprovalInfoWithOptions(request: QueryApprovalInfoRequest, runtime: Util.RuntimeOptions): QueryApprovalInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.page)) {
    query['Page'] = request.page;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.status)) {
    query['Status'] = request.status;
  }
  if (!Util.isUnset(request.userId)) {
    query['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryApprovalInfo',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Get approval flow information based on the approver.
 *
 * @param request QueryApprovalInfoRequest
 * @return QueryApprovalInfoResponse
 */
async function queryApprovalInfo(request: QueryApprovalInfoRequest): QueryApprovalInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryApprovalInfoWithOptions(request, runtime);
}

model QueryAuditLogRequest {
  endDate?: string(name='EndDate', description='This parameter is required.', example='1715856218001'),
  logType?: string(name='LogType', description='This parameter is required.', example='function'),
  operatorId?: string(name='OperatorId', example='95296e95-ca89-4c7d-8af9-dedf0ad0***'),
  operatorTypes?: string(name='OperatorTypes', example='MODIFY'),
  resourceType?: string(name='ResourceType', example='cube'),
  startDate?: string(name='StartDate', description='This parameter is required.', example='1715856218001'),
  workspaceId?: string(name='WorkspaceId', example='95296e95-ca89-4c7d-8af9-dedf0ad0****'),
}

model QueryAuditLogResponseBody = {
  requestId?: string(name='RequestId', example='78C1AA2D-9201-599E-A0BA-6FC462E57A95'),
  result?: [ 
    {
      gmtCreate?: string(name='GmtCreate', example='2024-04-16 13:17:39'),
      operatorAccountName?: string(name='OperatorAccountName', example='wukaibis'),
      operatorName?: string(name='OperatorName', example='buc_344078'),
      operatorType?: string(name='OperatorType', example='CREATE'),
      targetId?: string(name='TargetId', example='1113***************8500'),
      targetName?: string(name='TargetName'),
      targetType?: string(name='TargetType', example='USER'),
      workspaceId?: string(name='WorkspaceId', example='87c6b145-090c-43e1-9426-8f93be23****'),
    }
  ](name='Result'),
  success?: boolean(name='Success', example='true'),
}

model QueryAuditLogResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryAuditLogResponseBody(name='body'),
}

/**
 * @summary 查询审计日志信息。
 *
 * @param request QueryAuditLogRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryAuditLogResponse
 */
async function queryAuditLogWithOptions(request: QueryAuditLogRequest, runtime: Util.RuntimeOptions): QueryAuditLogResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.endDate)) {
    query['EndDate'] = request.endDate;
  }
  if (!Util.isUnset(request.logType)) {
    query['LogType'] = request.logType;
  }
  if (!Util.isUnset(request.operatorId)) {
    query['OperatorId'] = request.operatorId;
  }
  if (!Util.isUnset(request.operatorTypes)) {
    query['OperatorTypes'] = request.operatorTypes;
  }
  if (!Util.isUnset(request.resourceType)) {
    query['ResourceType'] = request.resourceType;
  }
  if (!Util.isUnset(request.startDate)) {
    query['StartDate'] = request.startDate;
  }
  if (!Util.isUnset(request.workspaceId)) {
    query['WorkspaceId'] = request.workspaceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryAuditLog',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 查询审计日志信息。
 *
 * @param request QueryAuditLogRequest
 * @return QueryAuditLogResponse
 */
async function queryAuditLog(request: QueryAuditLogRequest): QueryAuditLogResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryAuditLogWithOptions(request, runtime);
}

model QueryComponentPerformanceRequest {
  costTimeAvgMin?: int32(name='CostTimeAvgMin', description='The average duration (minutes).', example='1'),
  pageNum?: int32(name='PageNum', description='The current page number of the workspace member list:

*   Pages start from page 1.
*   Default value: 1.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of rows per page in a paged query.

*   Default value: 10.
*   Maximum value: 1,000.', example='100'),
  queryType?: string(name='QueryType', description='The query type. Valid values:

*   **lastDay**: Yesterday
*   **sevenDays**: Within seven days
*   **thirtyDays**: Within 30 days

This parameter is required.', example='sevenDays'),
  reportId?: string(name='ReportId', description='The ID of the work. The works here include BI portal, dashboards, spreadsheets, and self-service access.', example='6b407e50-e774-406b-9956-da2425c2****'),
  resourceType?: string(name='ResourceType', description='The resource types.', example='report'),
  workspaceId?: string(name='WorkspaceId', description='The workspace ID.

This parameter is required.', example='89713491-cb4f-4579-b889-e82c35f1****'),
}

model QueryComponentPerformanceResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='BCE45E6D-9304-4F94-86BB-5A772B1615FF'),
  result?: [ 
    {
      cacheCostTimeAvg?: double(name='CacheCostTimeAvg', description='The average duration of cache hits.', example='0.3'),
      cacheQueryCount?: int32(name='CacheQueryCount', description='The number of cache hits.', example='3'),
      componentId?: string(name='ComponentId', description='The component ID.', example='0696083a-ca72-4d89-8e7a-c017910e0***'),
      componentName?: string(name='ComponentName', description='The name of the add-on.'),
      costTimeAvg?: double(name='CostTimeAvg', description='The average query duration associated with the SQL pattern.', example='0.3'),
      queryCount?: int32(name='QueryCount', description='The number of queries.', example='5'),
      queryCountAvg?: double(name='QueryCountAvg', description='The average number of queries.', example='0.3'),
      queryOverFivePercentNum?: double(name='QueryOverFivePercentNum', description='The query exceeds the 5S number of queries.', example='5'),
      queryOverFiveSecPercent?: string(name='QueryOverFiveSecPercent', description='Query the proportion of more than 5S.', example='0.3'),
      queryOverTenSecPercent?: string(name='QueryOverTenSecPercent', description='The percentage of queries that exceed 10s.', example='0.3'),
      queryOverTenSecPercentNum?: double(name='QueryOverTenSecPercentNum', description='The percentage of queries that exceed 10s.', example='0.3'),
      queryTimeoutCount?: int32(name='QueryTimeoutCount', description='The number of times that the chart query times out.', example='1'),
      queryTimeoutCountPercent?: double(name='QueryTimeoutCountPercent', description='The percentage of timeout times for chart queries.', example='0.3'),
      quickIndexCostTimeAvg?: double(name='QuickIndexCostTimeAvg', description='The average time consumed by the Quick engine query.', example='0.3'),
      quickIndexQueryCount?: int32(name='QuickIndexQueryCount', description='The number of times that the Quick engine is hit.', example='3'),
      repeatQueryPercent?: string(name='RepeatQueryPercent', description='The proportion of duplicate queries.', example='0.3'),
      repeatQueryPercentNum?: double(name='RepeatQueryPercentNum', description='The number of duplicate queries.', example='2'),
      repeatSqlQueryCount?: int32(name='RepeatSqlQueryCount', description='The number of times the query is repeated.', example='5'),
      repeatSqlQueryPercent?: string(name='RepeatSqlQueryPercent', description='The proportion of duplicate queries.', example='0.3'),
      reportId?: string(name='ReportId', description='The ID of the work.', example='6b407e50-e774-406b-9956-da2425c2****'),
      reportName?: string(name='ReportName', description='The name of the report.', example='ClusterRiskReport'),
      reportType?: string(name='ReportType', description='The format of the report.', example='report'),
      workspaceId?: string(name='WorkspaceId', description='The unique ID of the space.', example='89713491-cb4f-4579-b889-e82c35f1****'),
      workspaceName?: string(name='WorkspaceName', description='The name of the group.'),
    }
  ](name='Result'),
  success?: boolean(name='Success', description='Indicates whether the request was successful. Valid values:

*   true: The request was successful.
*   false: The request failed.', example='true'),
}

model QueryComponentPerformanceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryComponentPerformanceResponseBody(name='body'),
}

/**
 * @summary Queries component performance logs.
 *
 * @param request QueryComponentPerformanceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryComponentPerformanceResponse
 */
async function queryComponentPerformanceWithOptions(request: QueryComponentPerformanceRequest, runtime: Util.RuntimeOptions): QueryComponentPerformanceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.costTimeAvgMin)) {
    query['CostTimeAvgMin'] = request.costTimeAvgMin;
  }
  if (!Util.isUnset(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.queryType)) {
    query['QueryType'] = request.queryType;
  }
  if (!Util.isUnset(request.reportId)) {
    query['ReportId'] = request.reportId;
  }
  if (!Util.isUnset(request.resourceType)) {
    query['ResourceType'] = request.resourceType;
  }
  if (!Util.isUnset(request.workspaceId)) {
    query['WorkspaceId'] = request.workspaceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryComponentPerformance',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries component performance logs.
 *
 * @param request QueryComponentPerformanceRequest
 * @return QueryComponentPerformanceResponse
 */
async function queryComponentPerformance(request: QueryComponentPerformanceRequest): QueryComponentPerformanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryComponentPerformanceWithOptions(request, runtime);
}

model QueryCopilotEmbedConfigRequest {
  keyword?: string(name='Keyword', example='06-ELive'),
}

model QueryCopilotEmbedConfigResponseBody = {
  requestId?: string(name='RequestId', example='1FC71085-D5FD-08E0-813A-4D4BD1031BC5'),
  result?: [ 
    {
      agentName?: string(name='AgentName'),
      copilotId?: string(name='CopilotId', example='9c079710-ddbe-48b3-b495-7c83c8d57cc4'),
      createUser?: string(name='CreateUser', example='qweqw12312423521'),
      createUserName?: string(name='CreateUserName'),
      dataRange?: {
        allCube?: boolean(name='AllCube', example='true/false'),
        allTheme?: boolean(name='AllTheme', example='true/false'),
        llmCubes?: [ string ](name='LlmCubes'),
        themes?: [ string ](name='Themes'),
      }(name='DataRange'),
      modifyUser?: string(name='ModifyUser', example='asda1231231dfs'),
      moduleName?: string(name='ModuleName'),
      showName?: string(name='ShowName', example='0327'),
    }
  ](name='Result'),
  success?: boolean(name='Success', example='true'),
}

model QueryCopilotEmbedConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryCopilotEmbedConfigResponseBody(name='body'),
}

/**
 * @summary 获取开通小Q嵌入的配置列表。
 *
 * @param request QueryCopilotEmbedConfigRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryCopilotEmbedConfigResponse
 */
async function queryCopilotEmbedConfigWithOptions(request: QueryCopilotEmbedConfigRequest, runtime: Util.RuntimeOptions): QueryCopilotEmbedConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.keyword)) {
    query['Keyword'] = request.keyword;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryCopilotEmbedConfig',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 获取开通小Q嵌入的配置列表。
 *
 * @param request QueryCopilotEmbedConfigRequest
 * @return QueryCopilotEmbedConfigResponse
 */
async function queryCopilotEmbedConfig(request: QueryCopilotEmbedConfigRequest): QueryCopilotEmbedConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryCopilotEmbedConfigWithOptions(request, runtime);
}

model QueryCubeOptimizationRequest {
  workspaceId?: string(name='WorkspaceId', description='The workspace ID.

This parameter is required.', example='95296e95-ca89-4c7d-8af9-dedf0ad0****'),
}

model QueryCubeOptimizationResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='D787E1A3-A93C-424A-B626-C2B05DF8D885'),
  result?: [ 
    {
      adviceType?: string(name='AdviceType', description='The type of the suggestion. Valid values:

*   **OPEN_CACHE**: Open cache.
*   **OPEN_QUICK_ENGINE**: Open FAST Cache.
*   **INCREASE_CACHE_TIME**: Increase the cache time.', example='OPENQUICKENGINE'),
      cubePerformanceDiagnoseModel?: {
        cacheCostTimeAvg?: double(name='CacheCostTimeAvg', description='The average duration of cache hits.', example='1'),
        cacheQueryCount?: int32(name='CacheQueryCount', description='The number of cache hits.', example='2'),
        costTimeAvg?: double(name='CostTimeAvg', description='The average query duration associated with the SQL pattern.', example='1.0'),
        cubeId?: string(name='CubeId', description='The dataset ID.', example='3e45b61a-9ba8-4c7c-8248-8dbe69945636'),
        cubeName?: string(name='CubeName', description='The name of the dataset.', example='test'),
        queryCount?: int32(name='QueryCount', description='The number of queries.', example='50'),
        queryCountAvg?: double(name='QueryCountAvg', description='The average number of queries.', example='2'),
        queryOverFivePercentNum?: double(name='QueryOverFivePercentNum', description='The percentage of the number of queries that exceed the 5S.', example='0.1'),
        queryOverFiveSecPercent?: string(name='QueryOverFiveSecPercent', description='Query the proportion of more than 5S.', example='0.5'),
        queryOverTenSecPercent?: string(name='QueryOverTenSecPercent', description='The percentage of queries that exceed 10s.', example='0.1'),
        queryOverTenSecPercentNum?: double(name='QueryOverTenSecPercentNum', description='The percentage of queries that exceed 10s.', example='0.3'),
        queryTimeoutCount?: int32(name='QueryTimeoutCount', description='The number of times that the chart query times out.', example='1'),
        queryTimeoutCountPercent?: double(name='QueryTimeoutCountPercent', description='The percentage of timeout times for chart queries.', example='0.3'),
        quickIndexCostTimeAvg?: double(name='QuickIndexCostTimeAvg', description='The average time consumed by the Quick engine query.', example='1'),
        quickIndexQueryCount?: int32(name='QuickIndexQueryCount', description='The number of times that the Quick engine is hit.', example='2'),
        repeatQueryPercent?: string(name='RepeatQueryPercent', description='The proportion of duplicate queries.', example='0.1'),
        repeatQueryPercentNum?: double(name='RepeatQueryPercentNum', description='The number of duplicate queries.', example='2'),
        repeatSqlQueryCount?: int32(name='RepeatSqlQueryCount', description='The number of times the query is repeated.', example='2'),
        repeatSqlQueryPercent?: string(name='RepeatSqlQueryPercent', description='The proportion of duplicate queries.', example='0.3'),
        workspaceId?: string(name='WorkspaceId', description='The workspace ID.', example='6ea74bff-c818-4188-b462-dbb45a24dbac'),
        workspaceName?: string(name='WorkspaceName', description='The name of the workspace.', example='eco0sh0prods'),
      }(name='CubePerformanceDiagnoseModel', description='The diagnostic information about the dataset.'),
    }
  ](name='Result'),
  success?: boolean(name='Success', description='Indicates whether the request was successful. Valid values:

*   true: The request was successful.
*   false: The request failed.', example='true'),
}

model QueryCubeOptimizationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryCubeOptimizationResponseBody(name='body'),
}

/**
 * @summary Queries dataset optimization suggestions.
 *
 * @param request QueryCubeOptimizationRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryCubeOptimizationResponse
 */
async function queryCubeOptimizationWithOptions(request: QueryCubeOptimizationRequest, runtime: Util.RuntimeOptions): QueryCubeOptimizationResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.workspaceId)) {
    query['WorkspaceId'] = request.workspaceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryCubeOptimization',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries dataset optimization suggestions.
 *
 * @param request QueryCubeOptimizationRequest
 * @return QueryCubeOptimizationResponse
 */
async function queryCubeOptimization(request: QueryCubeOptimizationRequest): QueryCubeOptimizationResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryCubeOptimizationWithOptions(request, runtime);
}

model QueryCubePerformanceRequest {
  costTimeAvgMin?: int32(name='CostTimeAvgMin', example='1'),
  cubeId?: string(name='CubeId', example='7c7223ae-****-3c744528014b'),
  pageNum?: int32(name='PageNum', example='1'),
  pageSize?: int32(name='PageSize', example='100'),
  queryType?: string(name='QueryType', description='This parameter is required.', example='sevenDays'),
  workspaceId?: string(name='WorkspaceId', description='This parameter is required.', example='95296e95-ca89-4c7d-8af9-dedf0ad0****'),
}

model QueryCubePerformanceResponseBody = {
  requestId?: string(name='RequestId', example='685072a0-1fd5-40ef-ae6b-cf94e79e718f'),
  result?: [ 
    {
      cacheCostTimeAvg?: double(name='CacheCostTimeAvg', example='1'),
      cacheQueryCount?: int32(name='CacheQueryCount', example='1'),
      costTimeAvg?: double(name='CostTimeAvg', example='1'),
      cubeId?: string(name='CubeId', example='7c7223ae-****-3c744528014b'),
      cubeName?: string(name='CubeName', example='test'),
      queryCount?: int32(name='QueryCount', example='50'),
      queryCountAvg?: double(name='QueryCountAvg', example='1'),
      queryOverFivePercentNum?: double(name='QueryOverFivePercentNum', example='1.0'),
      queryOverFiveSecPercent?: string(name='QueryOverFiveSecPercent', example='1.0'),
      queryOverTenSecPercent?: string(name='QueryOverTenSecPercent', example='1.0'),
      queryOverTenSecPercentNum?: double(name='QueryOverTenSecPercentNum', example='1.0'),
      queryTimeoutCount?: int32(name='QueryTimeoutCount', example='1'),
      queryTimeoutCountPercent?: double(name='QueryTimeoutCountPercent', example='1'),
      quickIndexCostTimeAvg?: double(name='QuickIndexCostTimeAvg', example='1'),
      quickIndexQueryCount?: int32(name='QuickIndexQueryCount', example='1'),
      repeatQueryPercent?: string(name='RepeatQueryPercent', example='0.3'),
      repeatQueryPercentNum?: double(name='RepeatQueryPercentNum', example='1'),
      repeatSqlQueryCount?: int32(name='RepeatSqlQueryCount', example='1'),
      repeatSqlQueryPercent?: string(name='RepeatSqlQueryPercent', example='1'),
      workspaceId?: string(name='WorkspaceId', example='87c6b145-090c-43e1-9426-8f93be23****'),
      workspaceName?: string(name='WorkspaceName'),
    }
  ](name='Result'),
  success?: boolean(name='Success', example='true'),
}

model QueryCubePerformanceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryCubePerformanceResponseBody(name='body'),
}

/**
 * @summary 查询数据集性能。
 *
 * @param request QueryCubePerformanceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryCubePerformanceResponse
 */
async function queryCubePerformanceWithOptions(request: QueryCubePerformanceRequest, runtime: Util.RuntimeOptions): QueryCubePerformanceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.costTimeAvgMin)) {
    query['CostTimeAvgMin'] = request.costTimeAvgMin;
  }
  if (!Util.isUnset(request.cubeId)) {
    query['CubeId'] = request.cubeId;
  }
  if (!Util.isUnset(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.queryType)) {
    query['QueryType'] = request.queryType;
  }
  if (!Util.isUnset(request.workspaceId)) {
    query['WorkspaceId'] = request.workspaceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryCubePerformance',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 查询数据集性能。
 *
 * @param request QueryCubePerformanceRequest
 * @return QueryCubePerformanceResponse
 */
async function queryCubePerformance(request: QueryCubePerformanceRequest): QueryCubePerformanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryCubePerformanceWithOptions(request, runtime);
}

model QueryDataRequest {
  apiId?: string(name='ApiId', description='The API ID in the data service. For more information, see: [Data Service](https://help.aliyun.com/document_detail/144980.html).

This parameter is required.', example='f4cc43bc3***'),
  conditions?: string(name='Conditions', description='The query conditions for the data service, passed in as Key and Value pairs. A map-type string. Here, Key is the name of the request parameter, and Value is the value of the request parameter. Key and Value must appear in pairs.

**Note:**

- When the operator of the request parameter is set to **enumeration filtering**, the value can contain multiple values, and the format of the value should be a JSON-formatted List. For example: `area=["East China","North China","South China"]`

- For dates, different formats are provided based on the type:

    - Year: 2019

    - Quarter: 2019Q1

    - Month: 201901 (with leading zero)
    
    - Week: 2019-52

    - Day: 20190101

    - Hour: 14:00:00 (minutes and seconds are 00)
    
    - Minute: 14:12:00 (seconds are 00)

    - Second: 14:34:34', example='{ "area": ["华东", "华北"],  "shopping_date": "2019Q1",  }'),
  returnFields?: string(name='ReturnFields', description='A list of return parameter names, in a List-type string.', example='["area", "city", "price", "date"]'),
  userId?: string(name='UserId', description='The userId in Quick BI. For how to obtain the userId, see: [Query User Information by Account Interface](https://next.api.aliyun.com/document/quickbi-public/2022-01-01/QueryUserInfoByAccount)
> This parameter is used to specify the identity of the person using the data service, which can be used in conjunction with the row and column permission configurations of the dataset.



>Notice: If the parameter is not passed, an empty string is passed, or null is passed, the default userId will be the owner of the current Quick BI organization.</notice>', example='b5d8fd9348cc4327****afb604'),
}

model QueryDataResponseBody = {
  requestId?: string(name='RequestId', description='Request ID.', example='a4d1a221d-41za1-****'),
  result?: {
    headers?: [ 
      {
        aggregator?: string(name='Aggregator', description='Aggregation operator. Only present for measure fields, such as SUM, AVG, and MAX.
- SUM: Sum
- MAX: Maximum value
- MIN: Minimum value
- AVG: Average
- COUNT: Count
- COUNTD: Distinct count
- STDDEV_POP: Population standard deviation
- STDDEV_SAMP: Sample standard deviation
- VAR_POP: Population variance
- VAR_SAMP: Sample variance', example='SUM'),
        column?: string(name='Column', description='Field name, corresponding to the physical table field name.', example='Specific physical field name'),
        dataType?: string(name='DataType', description='字段的数据类型。一般有：
- number：数值
- string：字符串
- date：日期
- time：时间
- datetime：日期时间', example='string'),
        granularity?: string(name='Granularity', description='The granularity of the dimension field.
This field is returned only when the requested field is a date or geographic dimension, with the following possible values:

- Date Granularity: yearRegion (year), monthRegion (month), weekRegion (week), dayRegion (day), hourRegion (hour), minRegion (minute), secRegion (second)

- Geographic Granularity: COUNTRY (international level), PROVINCE (provincial level), CITY (city level), XIAN (district/county level), REGION (region)', example='REGION'),
        label?: string(name='Label', description='Field alias, which serves as the key in the map data rows of the `values` parameter.', example='area'),
        type?: string(name='Type', description='Field type, used to distinguish between dimension and measure fields.
- Dimension: dimension
- Measure: measure', example='Dimension'),
      }
    ](name='Headers', description='Column headers.'),
    sql?: string(name='Sql', description='The SQL query that was executed.
> The filter conditions in the returned SQL statement include not only the parameters passed through this interface but also the row and column permission configurations.', example='SELECT COMPANY_T_1_.`area` AS D_AREA_2_, COMPANY_T_1_.`city` AS D_CITY_3_, SUM(COMPANY_T_1_.`profit_amt`) AS D_PROFIT_4_ FROM `quickbi_test`.`company_sales_record_copy` AS COMPANY_T_1_ WHERE COMPANY_T_1_.`area` LIKE \\\\"%华东%\\\\" GROUP BY COMPANY_T_1_.`area`, COMPANY_T_1_.`city` HAVING SUM(COMPANY_T_1_.`order_amt`) > 1 LIMIT 0, 10'),
    values?: [  map[string]any ](name='Values', description='The results of the query.'),
  }(name='Result', description='Returns the result of the interface execution. Possible values:

- true: Execution succeeded
- false: Execution failed'),
  success?: boolean(name='Success', description='Indicates whether the request was successful. Possible values:

- true: Request succeeded
- false: Request failed', example='true'),
}

model QueryDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryDataResponseBody(name='body'),
}

/**
 * @summary Invoke the open data service API.
 *
 * @description ### Prerequisites
 * You need to create a data service API through Quick BI\\"s data service. For more details, see: [Data Service](https://help.aliyun.com/document_detail/144980.html).
 * ### Usage Restrictions
 * * The data service feature is only available to professional edition customers.
 * * The timeout for data service API calls is 60s, and the QPS for a single API is 10 times/second.
 * * If row-level permissions are enabled on the dataset referenced by the data service API, the API call will also be intercepted by the row-level permission policy.
 *
 * @param request QueryDataRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryDataResponse
 */
async function queryDataWithOptions(request: QueryDataRequest, runtime: Util.RuntimeOptions): QueryDataResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiId)) {
    query['ApiId'] = request.apiId;
  }
  if (!Util.isUnset(request.conditions)) {
    query['Conditions'] = request.conditions;
  }
  if (!Util.isUnset(request.returnFields)) {
    query['ReturnFields'] = request.returnFields;
  }
  if (!Util.isUnset(request.userId)) {
    query['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryData',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Invoke the open data service API.
 *
 * @description ### Prerequisites
 * You need to create a data service API through Quick BI\\"s data service. For more details, see: [Data Service](https://help.aliyun.com/document_detail/144980.html).
 * ### Usage Restrictions
 * * The data service feature is only available to professional edition customers.
 * * The timeout for data service API calls is 60s, and the QPS for a single API is 10 times/second.
 * * If row-level permissions are enabled on the dataset referenced by the data service API, the API call will also be intercepted by the row-level permission policy.
 *
 * @param request QueryDataRequest
 * @return QueryDataResponse
 */
async function queryData(request: QueryDataRequest): QueryDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryDataWithOptions(request, runtime);
}

model QueryDataRangeRequest {
  keyword?: string(name='Keyword'),
  type?: string(name='Type', description='This parameter is required.', example='llmCube'),
}

model QueryDataRangeResponseBody = {
  requestId?: string(name='RequestId', example='D787E1A3-A93C-424A-B626-C2B05DF8D885'),
  result?: {
    apiCopilotLlmCubeModels?: [ 
      {
        alias?: string(name='Alias'),
        createUser?: string(name='CreateUser'),
        llmCubeId?: string(name='LlmCubeId', example='sdasdafas23342342342'),
      }
    ](name='ApiCopilotLlmCubeModels'),
    apiCopilotThemeModels?: [ 
      {
        apiCopilotLlmCubeModels?: [ 
          {
            alias?: string(name='Alias'),
            createUser?: string(name='CreateUser'),
            llmCubeId?: string(name='LlmCubeId', example='1231242231asdasda'),
          }
        ](name='ApiCopilotLlmCubeModels'),
        createUser?: string(name='CreateUser'),
        themeId?: string(name='ThemeId', example='36631232342312312'),
        themeName?: string(name='ThemeName'),
      }
    ](name='ApiCopilotThemeModels'),
  }(name='Result'),
  success?: boolean(name='Success', example='true'),
}

model QueryDataRangeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryDataRangeResponseBody(name='body'),
}

/**
 * @summary 获取数据范围目录列表。
 *
 * @param request QueryDataRangeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryDataRangeResponse
 */
async function queryDataRangeWithOptions(request: QueryDataRangeRequest, runtime: Util.RuntimeOptions): QueryDataRangeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.keyword)) {
    query['Keyword'] = request.keyword;
  }
  if (!Util.isUnset(request.type)) {
    query['Type'] = request.type;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryDataRange',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 获取数据范围目录列表。
 *
 * @param request QueryDataRangeRequest
 * @return QueryDataRangeResponse
 */
async function queryDataRange(request: QueryDataRangeRequest): QueryDataRangeResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryDataRangeWithOptions(request, runtime);
}

model QueryDataServiceRequest {
  apiId?: string(name='ApiId', description='The API ID in the data service. For more information, see [Data Service](https://help.aliyun.com/document_detail/144980.html).

This parameter is required.', example='f4cc43bc3***'),
  conditions?: string(name='Conditions', description='The query conditions for the data service, passed in as Key-Value pairs. This is a map-type string. Here, Key is the name of the request parameter, and Value is the value of the request parameter. Keys and Values must appear in pairs.

**Note:**

- When the operator of the request parameter is set to **enumeration filter**, the value can contain multiple values. In this case, the format of the value is a JSON list. For example: `area=["East China","North China","South China"]`     

- For dates, different formats are provided based on the type:

    - Year: 2019

    - Quarter: 2019Q1

    - Month: 201901 (with leading zero)
    
    - Week: 2019-52

    - Day: 20190101

    - Hour: 14:00:00 (minutes and seconds are 00)
    
    - Minute: 14:12:00 (seconds are 00)

    - Second: 14:34:34', example='{ "area": ["华东", "华北"],  "shopping_date": "2019Q1",  }'),
  returnFields?: string(name='ReturnFields', description='A list of parameter names to be returned, as a List-type string.', example='["area", "city", "price", "date"]'),
}

model QueryDataServiceResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='78C1AA2D-9201-599E-A0BA-6FC462E57A95'),
  result?: {
    headers?: [ 
      {
        aggregator?: string(name='Aggregator', description='Aggregation operator. Only present for measure fields, such as SUM, AVG, and MAX.', example='SUM'),
        column?: string(name='Column', description='Field name, corresponding to the physical table field name.', example='The alias of the field. The key of the map data row in the result parameter values.'),
        dataType?: string(name='DataType', description='The data type of the field. Common types include number, string, date, datetime, time, and geographic.', example='string'),
        granularity?: string(name='Granularity', description='The granularity of the dimension field.
This field is returned only when the requested field is a date or geographic dimension, with the following possible values:

- Date granularity: yearRegion (year), monthRegion (month), weekRegion (week), dayRegion (day), hourRegion (hour), minRegion (minute), secRegion (second)

- Geographic granularity: COUNTRY (country level), PROVINCE (province level), CITY (city level), XIAN (district/county level), REGION (region)', example='yearRegion'),
        label?: string(name='Label', description='字段别名，结果参数values中map数据行的key。', example='area'),
        type?: string(name='Type', description='Field type, used to distinguish between dimension and measure fields.', example='StandardDimension'),
      }
    ](name='Headers', description='Column headers.'),
    sql?: string(name='Sql', description='The SQL of the query request.', example='SELECT COMPANY_T_1_.`area` AS D_AREA_2_, COMPANY_T_1_.`city` AS D_CITY_3_, SUM(COMPANY_T_1_.`profit_amt`) AS D_PROFIT_4_ FROM `quickbi_test`.`company_sales_record_copy` AS COMPANY_T_1_ WHERE COMPANY_T_1_.`area` LIKE \\\\"%华东%\\\\" GROUP BY COMPANY_T_1_.`area`, COMPANY_T_1_.`city` HAVING SUM(COMPANY_T_1_.`order_amt`) > 1 LIMIT 0, 10'),
    values?: [  map[string]any ](name='Values', description='The queried results returned.'),
  }(name='Result', description='Returns the result of the interface query.'),
  success?: boolean(name='Success', description='Indicates whether the request was successful. Possible values:

- true: The request was successful

- false: The request failed', example='true'),
}

model QueryDataServiceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryDataServiceResponseBody(name='body'),
}

/**
 * @deprecated OpenAPI QueryDataService is deprecated, please use quickbi-public::2022-01-01::QueryData instead.
 *
 * @summary Invoke an already created API in the data service.
 *
 * @description #### Prerequisites
 * You create the data service API through Quick BI\\"s data service. For more details, see [Data Service](https://help.aliyun.com/document_detail/144980.html).
 * #### Usage Restrictions
 * * The data service feature is only available to professional edition customers. 
 * * The timeout for data service API calls is 60s, and the QPS for a single API is 10 times/second.
 * * If row-level permissions are enabled on the dataset referenced by the data service API, the API call may be intercepted by the row-level permission policy.
 *
 * @param request QueryDataServiceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryDataServiceResponse
 */
// Deprecated
async function queryDataServiceWithOptions(request: QueryDataServiceRequest, runtime: Util.RuntimeOptions): QueryDataServiceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiId)) {
    query['ApiId'] = request.apiId;
  }
  if (!Util.isUnset(request.conditions)) {
    query['Conditions'] = request.conditions;
  }
  if (!Util.isUnset(request.returnFields)) {
    query['ReturnFields'] = request.returnFields;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryDataService',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @deprecated OpenAPI QueryDataService is deprecated, please use quickbi-public::2022-01-01::QueryData instead.
 *
 * @summary Invoke an already created API in the data service.
 *
 * @description #### Prerequisites
 * You create the data service API through Quick BI\\"s data service. For more details, see [Data Service](https://help.aliyun.com/document_detail/144980.html).
 * #### Usage Restrictions
 * * The data service feature is only available to professional edition customers. 
 * * The timeout for data service API calls is 60s, and the QPS for a single API is 10 times/second.
 * * If row-level permissions are enabled on the dataset referenced by the data service API, the API call may be intercepted by the row-level permission policy.
 *
 * @param request QueryDataServiceRequest
 * @return QueryDataServiceResponse
 */
// Deprecated
async function queryDataService(request: QueryDataServiceRequest): QueryDataServiceResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryDataServiceWithOptions(request, runtime);
}

model QueryDataServiceListRequest {
  name?: string(name='Name', description='Data service name.', example='测试sql'),
  pageNo?: int32(name='PageNo', description='Page number. Default value: **1**.', example='1'),
  pageSize?: int32(name='PageSize', description='Number of items per page in a paginated query:

- Default value: 10
- Maximum value: 1000', example='10'),
  userId?: string(name='UserId', description='User ID.', example='dasdfdsa-csddf-dsadsa'),
}

model QueryDataServiceListResponseBody = {
  requestId?: string(name='RequestId', description='Request ID.', example='78C1AA2D-9201-599E-A0BA-6FC462E57A95'),
  result?: {
    data?: [ 
      {
        content?: {
          cubeId?: string(name='CubeId', description='Cube identifier ID.', example='56f9f34a-bdba-496a-91a3-a18b1ff73a80'),
          cubeName?: string(name='CubeName', description='Dataset name.', example='test data source'),
          detail?: boolean(name='Detail', description='Detail or Summary', example='true'),
          filter?: {
            filters?: [  map[string]any ](name='Filters', description='Combined conditions.'),
            logicalOperator?: string(name='LogicalOperator', description='Logical relationship between multiple SQL text keywords.

- **or**: or
- **and**: and', example='and'),
            type?: string(name='Type', description='Type.

- basic: basic
- combined: complex', example='basic'),
          }(name='Filter', description='Request parameter information.'),
          returnFields?: [ 
            {
              aggregator?: string(name='Aggregator', description='Aggregation operator. For example, SUM, AVG, and MAX.', example='SUM'),
              alias?: string(name='Alias', description='Field parameter name.', example='s_number'),
              desc?: string(name='Desc', description='Remark for the returned field.', example='Theme Configuration already exists'),
              field?: {
                caption?: string(name='Caption', description='Display name in the cube model (can be in Chinese or English).', example='date(year)'),
                column?: string(name='Column', description='The corresponding physical field name.', example='shid_star'),
                dataType?: string(name='DataType', description='Data type.

- number: numeric
- string: string
- date: date
- datetime: datetime
- time: time
- geographic: geographic
- boolean: boolean
- url: URL', example='datetime'),
                fid?: string(name='Fid', description='Unique identifier for the original field.', example='1c1f88cb7d'),
                granularity?: string(name='Granularity', description='This attribute is included for date and geographic dimensions, indicating the supported granularity.', example='yearRegion'),
                name?: string(name='Name', description='Unique name of the cube field, mainly used for unique positioning in the returned result.', example='sss'),
                type?: string(name='Type', description='Type.

- Dimension: Dimension
- Measure: Measure', example='dimension'),
              }(name='Field', description='Corresponding cube field information.'),
              orderby?: string(name='Orderby', description='Sorting.

- asc: Ascending
- desc: Descending
- no: No sorting', example='no'),
            }
          ](name='ReturnFields', description='Return information.'),
        }(name='Content', description='The model of the data service in JSON format.'),
        creatorId?: string(name='CreatorId', description='Creator ID.', example='7cb94cd48701'),
        creatorName?: string(name='CreatorName', description='Creator\\\\"s name.', example='zhangsan'),
        cubeId?: string(name='CubeId', description='Cube identifier ID.', example='d14e7448-0eb3-40d3-9375-4afef8de29fd'),
        cubeName?: string(name='CubeName', description='Dataset name.', example='test data source'),
        desc?: string(name='Desc', description='Description', example='test'),
        gmtCreate?: string(name='GmtCreate', description='Creation time.', example='2023-05-18 14:00:02.0'),
        gmtModified?: string(name='GmtModified', description='Modification time.', example='2023-03-21 18:02:36'),
        modifierId?: string(name='ModifierId', description='Modifier\\\\"s userId.', example='7cb94cd48701'),
        modifierName?: string(name='ModifierName', description='Modifier\\\\"s name', example='zhangsan'),
        name?: string(name='Name', description='Data service name.', example='test report'),
        ownerId?: string(name='OwnerId', description='Owner ID', example='862801339'),
        ownerName?: string(name='OwnerName', description='Owner\\\\"s name', example='lisi'),
        sid?: string(name='Sid', description='Unique ID of the data service.', example='dtsuq3i31f5j8v848b'),
        workspaceId?: string(name='WorkspaceId', description='Workspace ID.', example='7350a155-0e94-4c6c-8620-57bbec38****'),
        workspaceName?: string(name='WorkspaceName', description='Workspace name.', example='test workspace'),
      }
    ](name='Data', description='Data service information.'),
    pageNum?: int32(name='PageNum', description='Page number.', example='1'),
    pageSize?: int32(name='PageSize', description='Number of records per page.', example='10'),
    totalNum?: int32(name='TotalNum', description='Total number of rows.', example='1'),
    totalPages?: int32(name='TotalPages', description='Total number of pages.', example='1'),
  }(name='Result', description='Return result.'),
  success?: boolean(name='Success', description='Indicates whether the request was successful. Value range:
- true: The request was successful 
- false: The request failed', example='true'),
}

model QueryDataServiceListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryDataServiceListResponseBody(name='body'),
}

/**
 * @summary Query Data Service API List
 *
 * @param request QueryDataServiceListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryDataServiceListResponse
 */
async function queryDataServiceListWithOptions(request: QueryDataServiceListRequest, runtime: Util.RuntimeOptions): QueryDataServiceListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.pageNo)) {
    query['PageNo'] = request.pageNo;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.userId)) {
    query['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryDataServiceList',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Query Data Service API List
 *
 * @param request QueryDataServiceListRequest
 * @return QueryDataServiceListResponse
 */
async function queryDataServiceList(request: QueryDataServiceListRequest): QueryDataServiceListResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryDataServiceListWithOptions(request, runtime);
}

model QueryDatasetDetailInfoRequest {
  datasetId?: string(name='DatasetId', description='The ID of the training dataset that you want to remove from the specified custom linguistic model.

This parameter is required.', example='5820f58c-c734-4d8a-baf1-7979af4f****'),
}

model QueryDatasetDetailInfoResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='DC4E1E63-B337-44F8-8C22-6F00DF67E2C3'),
  result?: string(name='Result', description='Returns the dataset data in JSON format: `{ "cube": { "dimensions": [ { "caption": "customer name", "dataType": "string", "dimensionType": "standard_dimension", "factColumn": "customer_name", "uid": "N5820f5_customer_name" }, { "caption": "datastring", "" standard_dimension", "factColumn": "order_id", "uid": "N5820f5_order_id" }, ], "measures": [ { "caption": "order amount ", "dataType": "number", "factColumn": "order_amt", "measureType": "standard_measure ": " Nderamid " }, " { "customsql": false, "dsId": "261b252d-c3c3-498a-a0a7-5d1ec6cd****", "tableName": "company_sales_record_copy" } }, "datasetId": "5820f58c-c734-4d8a-baf1-7979af4f****", "datasetName": "company_sales_record_copy12", "datasource": { "dsId": "261b252d-c3c3-498a-a0a7-5d1ec6cd****", "dsName": "Self-use", "dsType": "mysql" }, "directory" { "id": "schemaad8aad00-9c55-4984-a767-b4e0ec60****", "name": "My dataset", "pathId": "schemaad8aad00-9c55-4984-a767-b4e0ec60****", "pathName": "My dataset" }, "ownerId": "13651626232****", "ownerName": "Zhang San", "rowLevel": false, "workspaceId": "95296e95-ca89-4c7d-8af9-dedf0ad0****", "workspaceName": "Test Workspace" }`', example='A JSON dataset is returned. For more information, see the description on the left.'),
  success?: boolean(name='Success', description='The execution result of the interface is returned. Valid values:

*   true: The request was successful.
*   false: The request fails.', example='true'),
}

model QueryDatasetDetailInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryDatasetDetailInfoResponseBody(name='body'),
}

/**
 * @summary Queries the details of a specified dataset, including the data source, directory, and dataset model.
 *
 * @description The data source, directory, and dataset model (including dimensions, measures, physical fields, custom SQL text, and association relationships).
 *
 * @param request QueryDatasetDetailInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryDatasetDetailInfoResponse
 */
async function queryDatasetDetailInfoWithOptions(request: QueryDatasetDetailInfoRequest, runtime: Util.RuntimeOptions): QueryDatasetDetailInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.datasetId)) {
    query['DatasetId'] = request.datasetId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryDatasetDetailInfo',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the details of a specified dataset, including the data source, directory, and dataset model.
 *
 * @description The data source, directory, and dataset model (including dimensions, measures, physical fields, custom SQL text, and association relationships).
 *
 * @param request QueryDatasetDetailInfoRequest
 * @return QueryDatasetDetailInfoResponse
 */
async function queryDatasetDetailInfo(request: QueryDatasetDetailInfoRequest): QueryDatasetDetailInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryDatasetDetailInfoWithOptions(request, runtime);
}

model QueryDatasetInfoRequest {
  datasetId?: string(name='DatasetId', description='Queries information about a specified dataset.

This parameter is required.', example='a201c85c-******'),
}

model QueryDatasetInfoResponseBody = {
  requestId?: string(name='RequestId', description='Whether the operation is successfully returned. Valid values:

*   true: The call is successful.
*   false: The call fails.', example='a4d1a221d-41za1-****'),
  result?: {
    cubeTableList?: [ 
      {
        caption?: string(name='Caption', description='Indicates whether the data source table is valid. Valid values:

*   true: data source table
*   false: custom table', example='odps_40'),
        customsql?: boolean(name='Customsql', description='The display name of the table.', example='false'),
        datasourceId?: string(name='DatasourceId', description='The name of the table.', example='dfefd7f4-fc6e-42c9-b4******'),
        dsType?: string(name='DsType', description='The ID of the data source.', example='maxcompute'),
        factTable?: boolean(name='FactTable', description='The unique ID of the table.', example='true'),
        sql?: string(name='Sql', description='Indicates whether the table is a custom SQL table. Valid values:

*   true: custom SQL table
*   false: non-custom SQL table', example='select * from ****'),
        tableName?: string(name='TableName', description='The list of tables used by the dataset.', example='viewdasb8494aab2612473cb74992159fe****'),
        uniqueId?: string(name='UniqueId', description='The type of the data source. Valid values:

*   mysql
*   odps
*   oracle
*   ... and other data source types supported by Quick BI', example='7a62530b36'),
      }
    ](name='CubeTableList', description='The unique ID of the dataset.'),
    custimzeSql?: boolean(name='CustimzeSql', description='The unique ID of the workspace to which the dataset belongs.', example='false'),
    datasetId?: string(name='DatasetId', description='The type of the data source. Valid values:

*   mysql
*   odps
*   oracle
*   ... Data source types supported by Quick BI such as', example='a201c85c-******'),
    datasetName?: string(name='DatasetName', description='The user ID of the dataset owner in the Quick BI.', example='opds_40'),
    dimensionList?: [ 
      {
        caption?: string(name='Caption', description='The unique ID of the field that is referenced by the group measure. Non-NULL if and only if the metric is a grouping metric.', example='city'),
        dataType?: string(name='DataType', description='A list of all dimensions in the dataset.', example='string'),
        dimensionType?: string(name='DimensionType', description='The actual physical field.', example='group_dimension'),
        expression?: string(name='Expression', description='Data type; value:

*   string: character
*   number: a number
*   datetime: time', example='example_expression'),
        factColumn?: string(name='FactColumn', description='Expression for a calculated dimension; valid only for calculated dimensions.', example='city'),
        fieldDescription?: string(name='FieldDescription', example='hhhh'),
        granularity?: string(name='Granularity', description='The type of the dimension. Valid values:

*   standard_dimension: General Dimension
*   calculate_dimension: calculating dimensions
*   group_dimension: grouping dimensions', example='example_granularity'),
        refUid?: string(name='RefUid', description='The granularity.', example='308f7****'),
        tableUniqueId?: string(name='TableUniqueId', description='The ARN.', example='7a62530***'),
        uid?: string(name='Uid', description='The display name of the dimension.', example='a69774***'),
      }
    ](name='DimensionList', description='If it is a custom SQL table, this is the specific SQL.'),
    directory?: {
      id?: string(name='Id', description='Test directory', example='a3eecab7-618d-4f9f-*****'),
      name?: string(name='Name', description='Test directory', example='The name of the directory.'),
      pathId?: string(name='PathId', description='The information about the directory to which the dataset belongs.', example='88b680****'),
      pathName?: string(name='PathName', description='The path of the directory ID, for example, aa/bb/cc/dd.', example='The path name of the directory ID, for example, one-level directory /two-level directory.'),
    }(name='Directory', description='The unique ID of the metric.'),
    dsId?: string(name='DsId', description='The name of the data source.', example='a201c85c-******'),
    dsName?: string(name='DsName', description='The time when the dataset was last modified.', example='odps'),
    dsType?: string(name='DsType', description='The point in time when the training dataset was created.', example='odps'),
    gmtCreate?: string(name='GmtCreate', description='Indicates whether to customize SQL statements. Valid values:

*   true
*   false', example='1629450382000'),
    gmtModify?: string(name='GmtModify', description='The information about the dataset.', example='1629450382000'),
    measureList?: [ 
      {
        caption?: string(name='Caption', description='The actual physical field.', example='profit_amt'),
        dataType?: string(name='DataType', description='A list of all measures for the dataset.', example='string'),
        expression?: string(name='Expression', description='Data type; value:

*   string: character
*   number: a number
*   datetime: time', example='example_expression'),
        factColumn?: string(name='FactColumn', description='The type of the measure. Valid values:

*   standard_measure: General Metrics
*   calculate_measure: Calculating Measures', example='profit_amt'),
        fieldDescription?: string(name='FieldDescription', example='hhhh'),
        measureType?: string(name='MeasureType', description='An expression that calculates a measure; valid only for calculated measures.', example='calculate_measure'),
        tableUniqueId?: string(name='TableUniqueId', description='The display name of the metric.', example='7a62530b36'),
        uid?: string(name='Uid', description='The unique ID of the table to which the table belongs, which corresponds to the UniqueId of the CubeTypeList.', example='88b680****'),
      }
    ](name='MeasureList', description='The unique ID of the table to which the table belongs, which corresponds to the UniqueId of the CubeTypeList.'),
    openOfflineAcceleration?: boolean(name='OpenOfflineAcceleration'),
    ownerId?: string(name='OwnerId', description='Test Space', example='b8494aab26124*****'),
    ownerName?: string(name='OwnerName', description='The unique ID of the data source.', example='The name of the dataset owner.'),
    rowLevel?: boolean(name='RowLevel', description='The name of the training dataset.', example='false'),
    workspaceId?: string(name='WorkspaceId', description='Whether row-level permissions are enabled. Valid values:

*   true: The VIP Netty channel is enabled.
*   false: The VIP Netty channel is disabled.', example='420abef4-a79b-4289-b12****'),
    workspaceName?: string(name='WorkspaceName', description='Big Baby', example='The name of the workspace in which the dataset resides.'),
  }(name='Result', description='The ID of the request.'),
  success?: boolean(name='Success', description='The unique ID of the dataset.', example='true'),
}

model QueryDatasetInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryDatasetInfoResponseBody(name='body'),
}

/**
 * @summary Indicates whether the table is a custom SQL table. Valid values:
 * *   true: custom SQL table
 * *   false: non-custom SQL table
 *
 * @param request QueryDatasetInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryDatasetInfoResponse
 */
async function queryDatasetInfoWithOptions(request: QueryDatasetInfoRequest, runtime: Util.RuntimeOptions): QueryDatasetInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.datasetId)) {
    query['DatasetId'] = request.datasetId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryDatasetInfo',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Indicates whether the table is a custom SQL table. Valid values:
 * *   true: custom SQL table
 * *   false: non-custom SQL table
 *
 * @param request QueryDatasetInfoRequest
 * @return QueryDatasetInfoResponse
 */
async function queryDatasetInfo(request: QueryDatasetInfoRequest): QueryDatasetInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryDatasetInfoWithOptions(request, runtime);
}

model QueryDatasetListRequest {
  directoryId?: string(name='DirectoryId', description='The ID of the request.', example='schemaad8aad00-9c55-4984-a767-b4e0ec60****'),
  keyword?: string(name='Keyword', description='Information about the directory where the dataset is located', example='Queries the datasets of a specified workspace. The datasets are sorted in descending order by creation time.'),
  pageNum?: int32(name='PageNum', description='The ID of the workspace.', example='1'),
  pageSize?: int32(name='PageSize', description='Specifies the directory ID.

*   If this field is not empty, all datasets in the directory are obtained.', example='10'),
  withChildren?: boolean(name='WithChildren', description='The total number of pages returned.', example='true'),
  workspaceId?: string(name='WorkspaceId', description='The name of the data source.

This parameter is required.', example='95296e95-ca89-4c7d-8af9-dedf0ad0****'),
}

model QueryDatasetListResponseBody = {
  requestId?: string(name='RequestId', description='The keyword used to search for the dataset name.', example='D787E1A3-A93C-424A-B626-C2B05DF8D885'),
  result?: {
    data?: [ 
      {
        createTime?: string(name='CreateTime', description='The details of the dataset list.', example='2020-11-02 10:36:05'),
        dataSource?: {
          dsId?: string(name='DsId', description='The ID of the training dataset that you want to remove from the specified custom linguistic model.', example='261b252d-c3c3-498a-a0a7-5d1ec6cd****'),
          dsName?: string(name='DsName', description='The time when the scaling group was modified.', example='The name of the training dataset.'),
          dsType?: string(name='DsType', description='The user ID of the dataset owner in the Quick BI.', example='mysql'),
        }(name='DataSource', description='Test Space'),
        datasetId?: string(name='DatasetId', description='The name of the workspace.', example='5820f58c-c734-4d8a-baf1-7979af4f****'),
        datasetName?: string(name='DatasetName', description='Tom', example='company_sales_record_copy12'),
        description?: string(name='Description', description='The number of rows per page set when the interface is requested.', example='The total number of rows in the table.'),
        directory?: {
          id?: string(name='Id', description='The ID of the directory path.', example='schemaad8aad00-9c55-4984-a767-b4e0ec60****'),
          name?: string(name='Name', description='The ID of the data source.', example='Information about the directory where the dataset is located'),
          pathId?: string(name='PathId', description='The type of the data source.', example='schemaad8aad00-9c55-4984-a767-b4e0ec60****'),
          pathName?: string(name='PathName', description='The name of the data source.', example='Test a data source'),
        }(name='Directory', description='The information about the data source to which the dataset belongs.'),
        modifyTime?: string(name='ModifyTime', description='The nickname of the dataset owner.', example='2020-11-02 10:36:05'),
        openOfflineAcceleration?: boolean(name='OpenOfflineAcceleration'),
        ownerId?: string(name='OwnerId', description='The creation time.', example='136516262323****'),
        ownerName?: string(name='OwnerName', description='Whether to enable row-level permissions. Valid values:

*   true: The VIP Netty channel is enabled.
*   false: The incremental log backup feature is disabled.', example='The ID of the workspace.'),
        rowLevel?: boolean(name='RowLevel', description='The total number of pages returned.', example='true'),
        workspaceId?: string(name='WorkspaceId', description='The page number of the returned page.', example='95296e95-ca89-4c7d-8af9-dedf0ad06adf'),
        workspaceName?: string(name='WorkspaceName', description='The description of the dataset.', example='Test dataset'),
      }
    ](name='Data', description='Returns the pagination results of the dataset list. The detailed information of the dataset list is stored in the response parameter Data.'),
    pageNum?: int32(name='PageNum', description='The number of rows per page in a paged query.

*   Default value: 10.
*   Maximum value: 1,000.', example='1'),
    pageSize?: int32(name='PageSize', description='Indicates whether the request is successful. Valid values:

*   true: The request was successful.
*   false: The request failed.', example='10'),
    totalNum?: int32(name='TotalNum', description='The ID of the request.', example='1'),
    totalPages?: int32(name='TotalPages', description='Current page number for dataset list:

*   Pages start from page 1.
*   Default value: 1.', example='1'),
  }(name='Result', description='Test dataset'),
  success?: boolean(name='Success', description='Whether to recursively wrap the dataset in the subdirectory. Valid values:

*   true: returns datasets in all recursive subdirectories in the directoryId directory.
*   false: Only datasets in the directory specified by directoryId are returned, excluding subdirectories.', example='true'),
}

model QueryDatasetListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryDatasetListResponseBody(name='body'),
}

/**
 * @summary The name of the training dataset.
 *
 * @param request QueryDatasetListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryDatasetListResponse
 */
async function queryDatasetListWithOptions(request: QueryDatasetListRequest, runtime: Util.RuntimeOptions): QueryDatasetListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.directoryId)) {
    query['DirectoryId'] = request.directoryId;
  }
  if (!Util.isUnset(request.keyword)) {
    query['Keyword'] = request.keyword;
  }
  if (!Util.isUnset(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.withChildren)) {
    query['WithChildren'] = request.withChildren;
  }
  if (!Util.isUnset(request.workspaceId)) {
    query['WorkspaceId'] = request.workspaceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryDatasetList',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary The name of the training dataset.
 *
 * @param request QueryDatasetListRequest
 * @return QueryDatasetListResponse
 */
async function queryDatasetList(request: QueryDatasetListRequest): QueryDatasetListResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryDatasetListWithOptions(request, runtime);
}

model QueryDatasetSmartqStatusRequest {
  cubeId?: string(name='CubeId', description='This parameter is required.', example='7c7223ae-****-3c744528014b'),
}

model QueryDatasetSmartqStatusResponseBody = {
  requestId?: string(name='RequestId', example='7c7223ae-****-3c744528014b'),
  result?: boolean(name='Result', example='true'),
  success?: boolean(name='Success', example='true'),
}

model QueryDatasetSmartqStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryDatasetSmartqStatusResponseBody(name='body'),
}

/**
 * @summary 查看数据集是否开通智能问数
 *
 * @param request QueryDatasetSmartqStatusRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryDatasetSmartqStatusResponse
 */
async function queryDatasetSmartqStatusWithOptions(request: QueryDatasetSmartqStatusRequest, runtime: Util.RuntimeOptions): QueryDatasetSmartqStatusResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.cubeId)) {
    query['CubeId'] = request.cubeId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryDatasetSmartqStatus',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 查看数据集是否开通智能问数
 *
 * @param request QueryDatasetSmartqStatusRequest
 * @return QueryDatasetSmartqStatusResponse
 */
async function queryDatasetSmartqStatus(request: QueryDatasetSmartqStatusRequest): QueryDatasetSmartqStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryDatasetSmartqStatusWithOptions(request, runtime);
}

model QueryDatasetSwitchInfoRequest {
  cubeId?: string(name='CubeId', description='This parameter is required.', example='7c7223ae-****-3c744528014b'),
}

model QueryDatasetSwitchInfoResponseBody = {
  requestId?: string(name='RequestId', example='FAECEFA8-09BB-58AB-BC58-C8ACEFE4D232'),
  result?: {
    cubeId?: string(name='CubeId', example='7c7223ae-****-3c744528014b'),
    isOpenColumnLevelPermission?: int32(name='IsOpenColumnLevelPermission', example='1'),
    isOpenRowLevelPermission?: int32(name='IsOpenRowLevelPermission', example='1'),
  }(name='Result'),
  success?: boolean(name='Success', example='true'),
}

model QueryDatasetSwitchInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryDatasetSwitchInfoResponseBody(name='body'),
}

/**
 * @summary 获取指定数据集的行级权限开关状态。
 *
 * @param request QueryDatasetSwitchInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryDatasetSwitchInfoResponse
 */
async function queryDatasetSwitchInfoWithOptions(request: QueryDatasetSwitchInfoRequest, runtime: Util.RuntimeOptions): QueryDatasetSwitchInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.cubeId)) {
    query['CubeId'] = request.cubeId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryDatasetSwitchInfo',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 获取指定数据集的行级权限开关状态。
 *
 * @param request QueryDatasetSwitchInfoRequest
 * @return QueryDatasetSwitchInfoResponse
 */
async function queryDatasetSwitchInfo(request: QueryDatasetSwitchInfoRequest): QueryDatasetSwitchInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryDatasetSwitchInfoWithOptions(request, runtime);
}

model QueryEmbeddedInfoResponseBody = {
  requestId?: string(name='RequestId', example='D787E1A3-A93C-424A-B626-C2B05DF8D885'),
  result?: {
    detail?: {
      dashboardOfflineQuery?: int32(name='DashboardOfflineQuery', example='1'),
      page?: int32(name='Page', example='1'),
      report?: int32(name='Report', example='1'),
    }(name='Detail'),
    embeddedCount?: int32(name='EmbeddedCount', example='3'),
    maxCount?: int32(name='MaxCount', example='100'),
  }(name='Result'),
  success?: boolean(name='Success', description='Indicates whether the request is successful. Valid values:

*   true: The request was successful.
*   false: The request failed.', example='true'),
}

model QueryEmbeddedInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryEmbeddedInfoResponseBody(name='body'),
}

/**
 * @summary The number of reports that are currently embedded.
 *
 * @param request QueryEmbeddedInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryEmbeddedInfoResponse
 */
async function queryEmbeddedInfoWithOptions(runtime: Util.RuntimeOptions): QueryEmbeddedInfoResponse {
  var req = new OpenApi.OpenApiRequest{};
  var params = new OpenApi.Params{
    action = 'QueryEmbeddedInfo',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary The number of reports that are currently embedded.
 *
 * @return QueryEmbeddedInfoResponse
 */
async function queryEmbeddedInfo(): QueryEmbeddedInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryEmbeddedInfoWithOptions(runtime);
}

model QueryEmbeddedStatusRequest {
  worksId?: string(name='WorksId', description='The work ID of the query.

This parameter is required.', example='95296e95-ca89-4c7d-8af9-dedf0ad0****'),
}

model QueryEmbeddedStatusResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='D787E1A3-A93C-424A-B626-C2B05DF8D885'),
  result?: boolean(name='Result', description='Whether the work is enabled for embedding. Valid values:

*   true: embedded
*   false: not embedded', example='true'),
  success?: boolean(name='Success', description='Indicates whether the request is successful. Valid values:

*   true: The request was successful.
*   false: The request failed.', example='true'),
}

model QueryEmbeddedStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryEmbeddedStatusResponseBody(name='body'),
}

/**
 * @summary Queries whether embedding is enabled for a report.
 *
 * @param request QueryEmbeddedStatusRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryEmbeddedStatusResponse
 */
async function queryEmbeddedStatusWithOptions(request: QueryEmbeddedStatusRequest, runtime: Util.RuntimeOptions): QueryEmbeddedStatusResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.worksId)) {
    query['WorksId'] = request.worksId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryEmbeddedStatus',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries whether embedding is enabled for a report.
 *
 * @param request QueryEmbeddedStatusRequest
 * @return QueryEmbeddedStatusResponse
 */
async function queryEmbeddedStatus(request: QueryEmbeddedStatusRequest): QueryEmbeddedStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryEmbeddedStatusWithOptions(request, runtime);
}

model QueryLlmCubeWithThemeListByUserIdRequest {
  userId?: string(name='UserId', description='This parameter is required.', example='adsdasd-***********-123wdasd'),
}

model QueryLlmCubeWithThemeListByUserIdResponseBody = {
  requestId?: string(name='RequestId', example='2EE822B***************F-F5B42DDADC12'),
  result?: {
    cubeIds?: map[string]string(name='CubeIds'),
    themeIds?: map[string]string(name='ThemeIds'),
  }(name='Result'),
  success?: boolean(name='Success', example='true'),
}

model QueryLlmCubeWithThemeListByUserIdResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryLlmCubeWithThemeListByUserIdResponseBody(name='body'),
}

/**
 * @summary 查看用户有哪些数据集和分析主题的问数授权
 *
 * @param request QueryLlmCubeWithThemeListByUserIdRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryLlmCubeWithThemeListByUserIdResponse
 */
async function queryLlmCubeWithThemeListByUserIdWithOptions(request: QueryLlmCubeWithThemeListByUserIdRequest, runtime: Util.RuntimeOptions): QueryLlmCubeWithThemeListByUserIdResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.userId)) {
    query['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryLlmCubeWithThemeListByUserId',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 查看用户有哪些数据集和分析主题的问数授权
 *
 * @param request QueryLlmCubeWithThemeListByUserIdRequest
 * @return QueryLlmCubeWithThemeListByUserIdResponse
 */
async function queryLlmCubeWithThemeListByUserId(request: QueryLlmCubeWithThemeListByUserIdRequest): QueryLlmCubeWithThemeListByUserIdResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryLlmCubeWithThemeListByUserIdWithOptions(request, runtime);
}

model QueryOrganizationRoleConfigRequest {
  roleId?: long(name='RoleId', description='Organization role ID, including predefined roles and custom roles:

- Organization Administrator (predefined role): 111111111
- Permission Administrator (predefined role): 111111112
- Regular User (predefined role): 111111113
- Custom Role: The corresponding role ID of the custom role

This parameter is required.', example='111111111'),
}

model QueryOrganizationRoleConfigResponseBody = {
  requestId?: string(name='RequestId', description='Request ID.', example='BCE45E6D-9304-4F94-86BB-5A772B1615FF'),
  result?: {
    authConfigList?: [ 
      {
        authKey?: string(name='AuthKey', description='Permission type:
- quick_monitor: Metric Monitoring
- subscription: Subscription Management
- offline_download: Self-service Data Retrieval
- resource_package: Resource Package Management
- organization_ask: Organization Access Key/Secret (AK/SK)
- developer_openapi: Open API
- data_service: Data Service
- admin_authorize3rd: Embedded Analysis
- component_manage: Custom Component
- template_open: Custom Template
- custom_driver: Custom Driver (supported only in standalone deployment)
- open_platform_custom_plugin: Custom Plugin (supported only in standalone deployment)
- enterprise_safety: Enterprise Security', example='quick_monitor'),
      }
    ](name='AuthConfigList', description='List of role permission configurations.'),
    isSystemRole?: boolean(name='IsSystemRole', description='Whether it is a predefined role. Possible values:

- true: Yes
- false: No', example='true'),
    roleId?: long(name='RoleId', description='Organization role ID, including predefined roles and custom roles:

- Organization Administrator (predefined role): 111111111
- Permission Administrator (predefined role): 111111112
- Regular User (predefined role): 111111113
- Custom Role: The corresponding role ID of the custom role', example='111111111'),
    roleName?: string(name='RoleName', description='Role name.', example='Organization Admin'),
  }(name='Result', description='Details of the organization role configuration.'),
  success?: boolean(name='Success', description='Indicates whether the request was successful. Possible values:
- true: The request was successful 
- false: The request failed', example='true'),
}

model QueryOrganizationRoleConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryOrganizationRoleConfigResponseBody(name='body'),
}

/**
 * @summary Retrieve Configuration Information for a Specified Organization Role
 *
 * @param request QueryOrganizationRoleConfigRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryOrganizationRoleConfigResponse
 */
async function queryOrganizationRoleConfigWithOptions(request: QueryOrganizationRoleConfigRequest, runtime: Util.RuntimeOptions): QueryOrganizationRoleConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.roleId)) {
    query['RoleId'] = request.roleId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryOrganizationRoleConfig',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Retrieve Configuration Information for a Specified Organization Role
 *
 * @param request QueryOrganizationRoleConfigRequest
 * @return QueryOrganizationRoleConfigResponse
 */
async function queryOrganizationRoleConfig(request: QueryOrganizationRoleConfigRequest): QueryOrganizationRoleConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryOrganizationRoleConfigWithOptions(request, runtime);
}

model QueryOrganizationWorkspaceListRequest {
  keyword?: string(name='Keyword'),
  pageNum?: int32(name='PageNum', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  userId?: string(name='UserId', example='fe67f61a35a94b7da1a34ba174a7****'),
}

model QueryOrganizationWorkspaceListResponseBody = {
  requestId?: string(name='RequestId', example='D787E1A3-A93C-424A-B626-C2B05DF8D885'),
  result?: {
    data?: [ 
      {
        allowPublishOperation?: boolean(name='AllowPublishOperation', example='true'),
        allowShareOperation?: boolean(name='AllowShareOperation', example='true'),
        createTime?: string(name='CreateTime', example='2020-11-10 17:51:07'),
        createUser?: string(name='CreateUser', example='de4bc5f9429141cc8091cdd1c15b****'),
        createUserAccountName?: string(name='CreateUserAccountName', example='pop****@aliyun.com'),
        modifiedTime?: string(name='ModifiedTime', example='2020-11-10 17:51:07'),
        modifyUser?: string(name='ModifyUser', example='de4bc5f9429141cc8091cdd1c15b****'),
        modifyUserAccountName?: string(name='ModifyUserAccountName', example='pop****@aliyun.com'),
        organizationId?: string(name='OrganizationId', example='2fe4fbd8-588f-489a-b3e1-e92c7af0****'),
        owner?: string(name='Owner', example='de4bc5f9429141cc8091cdd1c15b****'),
        ownerAccountName?: string(name='OwnerAccountName', example='pop****@aliyun.com'),
        workspaceDescription?: string(name='WorkspaceDescription'),
        workspaceId?: string(name='WorkspaceId', example='7350a155-0e94-4c6c-8620-57bbec38****'),
        workspaceName?: string(name='WorkspaceName'),
      }
    ](name='Data'),
    pageNum?: int32(name='PageNum', example='1'),
    pageSize?: int32(name='PageSize', example='10'),
    totalNum?: int32(name='TotalNum', example='1'),
    totalPages?: int32(name='TotalPages', example='1'),
  }(name='Result'),
  success?: boolean(name='Success', example='true'),
}

model QueryOrganizationWorkspaceListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryOrganizationWorkspaceListResponseBody(name='body'),
}

/**
 * @summary 获取当前组织下的工作空间列表信息。
 *
 * @param request QueryOrganizationWorkspaceListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryOrganizationWorkspaceListResponse
 */
async function queryOrganizationWorkspaceListWithOptions(request: QueryOrganizationWorkspaceListRequest, runtime: Util.RuntimeOptions): QueryOrganizationWorkspaceListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.keyword)) {
    query['Keyword'] = request.keyword;
  }
  if (!Util.isUnset(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.userId)) {
    query['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryOrganizationWorkspaceList',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 获取当前组织下的工作空间列表信息。
 *
 * @param request QueryOrganizationWorkspaceListRequest
 * @return QueryOrganizationWorkspaceListResponse
 */
async function queryOrganizationWorkspaceList(request: QueryOrganizationWorkspaceListRequest): QueryOrganizationWorkspaceListResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryOrganizationWorkspaceListWithOptions(request, runtime);
}

model QueryReadableResourcesListByUserIdRequest {
  userId?: string(name='UserId', description='Quick BI the user ID.

This parameter is required.', example='de4bc5f9429141cc8091cdd1c15b****'),
}

model QueryReadableResourcesListByUserIdResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='D787E1A3-A93C-424A-B626-C2B05DF8D885'),
  result?: [ 
    {
      createTime?: string(name='CreateTime', description='The timestamp of the creation time in milliseconds.', example='1611023338000'),
      description?: string(name='Description', description='Remarks on the work.', example='Description'),
      directory?: {
        id?: string(name='Id', example='e4276ea5-b232-4fb1-8f0f-efcee4a2****'),
        name?: string(name='Name'),
        pathId?: string(name='PathId', example='e4276ea5-b232-4fb1-8f0f-efcee4a2****'),
        pathName?: string(name='PathName'),
      }(name='Directory'),
      modifyName?: string(name='ModifyName', description='The name of the Alibaba Cloud account to which the modifier belongs.', example='Li Si'),
      modifyTime?: string(name='ModifyTime', example='1611023338000'),
      ownerId?: string(name='OwnerId', description='The Quick BI UserID of the work owner.', example='46e5374665ba4b679ee22e2a2927****'),
      ownerName?: string(name='OwnerName', description='The Alibaba Cloud account name of the owner.', example='Tom'),
      securityLevel?: string(name='SecurityLevel', description='Security policies for collaborative authorization of works. Valid values:

*   0: private
*   12: Authorize specified members
*   1 or 11: Authorize all workspace members

> 

*   If you use legacy permissions, the return value is 1.

*   If you use the new permissions, the return value is 11.', example='0'),
      status?: int32(name='Status', description='The status of the report. Valid values:

*   0: unpublished
*   1: published
*   2: modified but not published
*   3: unpublished', example='1'),
      thirdPartAuthFlag?: int32(name='ThirdPartAuthFlag', description='Third-party embedding status. Valid values:

*   0: The embed service is not enabled.
*   1: Embed is enabled.', example='1'),
      workName?: string(name='WorkName', description='The name of the work.'),
      workType?: string(name='WorkType', description='The type of the work. Valid values:

*   DATAPRODUCT: BI portal
*   PAGE: Dashboard
*   FULLPAGE: full-screen dashboards
*   REPORT: workbook', example='PAGE'),
      worksId?: string(name='WorksId', description='The ID of the work.', example='03366b16-69ce-43c8-b782-56c2f6ec****'),
      workspaceId?: string(name='WorkspaceId', description='The ID of the workspace to which the work belongs.', example='89713491-cb4f-4579-b889-e82c35f1****'),
      workspaceName?: string(name='WorkspaceName', description='The name of the workspace to which the work belongs.', example='Test Workspace'),
    }
  ](name='Result', description='The list of works that the user has permission to view.'),
  success?: boolean(name='Success', description='Indicates whether the request is successful. Valid values:

*   true: The request was successful.
*   false: The request failed.', example='true'),
}

model QueryReadableResourcesListByUserIdResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryReadableResourcesListByUserIdResponseBody(name='body'),
}

/**
 * @summary The Alibaba Cloud account name of the owner.
 *
 * @param request QueryReadableResourcesListByUserIdRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryReadableResourcesListByUserIdResponse
 */
async function queryReadableResourcesListByUserIdWithOptions(request: QueryReadableResourcesListByUserIdRequest, runtime: Util.RuntimeOptions): QueryReadableResourcesListByUserIdResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.userId)) {
    query['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryReadableResourcesListByUserId',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary The Alibaba Cloud account name of the owner.
 *
 * @param request QueryReadableResourcesListByUserIdRequest
 * @return QueryReadableResourcesListByUserIdResponse
 */
async function queryReadableResourcesListByUserId(request: QueryReadableResourcesListByUserIdRequest): QueryReadableResourcesListByUserIdResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryReadableResourcesListByUserIdWithOptions(request, runtime);
}

model QueryReportPerformanceRequest {
  costTimeAvgMin?: int32(name='CostTimeAvgMin', description='The average duration (minutes).', example='1'),
  pageNum?: int32(name='PageNum', description='Current page number for organization member list:

*   Pages start from page 1.
*   Default value: 1.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of rows per page in a paged query.

*   Default value: 10.
*   Maximum value: 1,000.', example='10'),
  queryType?: string(name='QueryType', description='The query type. Valid values:

*   **lastDay**: Yesterday
*   **sevenDays**: Within seven days
*   **thirtyDays**: Within 30 days

This parameter is required.', example='sevenDays'),
  reportId?: string(name='ReportId', description='The ID of the security report.', example='6b407e50-e774-406b-9956-da2425c2****'),
  resourceType?: string(name='ResourceType', description='The resource types.', example='report'),
  workspaceId?: string(name='WorkspaceId', description='The workspace ID.

This parameter is required.', example='95296e95-ca89-4c7d-8af9-dedf0ad0****'),
}

model QueryReportPerformanceResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='1FC71085-D5FD-08E0-813A-4D4BD1031BC5'),
  result?: [ 
    {
      cacheCostTimeAvg?: double(name='CacheCostTimeAvg', description='The average duration of cache hits.', example='2.2'),
      cacheQueryCount?: int32(name='CacheQueryCount', description='The number of cache hits.', example='1'),
      componentQueryCount?: int32(name='ComponentQueryCount', description='The number of times the chart is queried.', example='1'),
      componentQueryCountAvg?: double(name='ComponentQueryCountAvg', description='The average number of times the chart is queried.', example='2.0'),
      costTimeAvg?: double(name='CostTimeAvg', description='The average query duration associated with the SQL pattern.', example='0.2'),
      queryCount?: int32(name='QueryCount', description='The number of queries.', example='50'),
      queryCountAvg?: double(name='QueryCountAvg', description='The average number of queries.', example='3.3'),
      queryOverFivePercentNum?: double(name='QueryOverFivePercentNum', description='The percentage of the number of queries that exceed the 5S.', example='0.5'),
      queryOverFiveSecPercent?: string(name='QueryOverFiveSecPercent', description='Query the proportion of more than 5S.', example='0.5'),
      queryOverTenSecPercent?: string(name='QueryOverTenSecPercent', description='The percentage of queries that exceed 10s.', example='0.5'),
      queryOverTenSecPercentNum?: double(name='QueryOverTenSecPercentNum', description='The number of queries that exceed 10 seconds.', example='0.5'),
      queryTimeoutCount?: int32(name='QueryTimeoutCount', description='The number of times that the chart query times out.', example='8'),
      queryTimeoutCountPercent?: double(name='QueryTimeoutCountPercent', description='The percentage of timeout times for chart queries.', example='0.5'),
      quickIndexCostTimeAvg?: double(name='QuickIndexCostTimeAvg', description='The average time consumed by the Quick engine query.', example='10'),
      quickIndexQueryCount?: int32(name='QuickIndexQueryCount', description='The number of times that the Quick engine is hit.', example='5'),
      repeatQueryPercent?: string(name='RepeatQueryPercent', description='The proportion of duplicate queries.', example='0.8'),
      repeatQueryPercentNum?: double(name='RepeatQueryPercentNum', description='The number of duplicate queries.', example='3'),
      repeatSqlQueryCount?: int32(name='RepeatSqlQueryCount', description='The number of times the query is repeated.', example='1'),
      repeatSqlQueryPercent?: string(name='RepeatSqlQueryPercent', description='The proportion of duplicate queries.', example='0.7'),
      reportId?: string(name='ReportId', description='The ID of the work.', example='6b407e50-e774-406b-9956-da2425c2****'),
      reportName?: string(name='ReportName', description='The name of the report.', example='ClusterAddonUpgradeReport'),
      reportType?: string(name='ReportType', description='The format of the report.', example='report'),
      workspaceId?: string(name='WorkspaceId', description='The ID of the workspace to which the work belongs.', example='ab46ed33-6278-4ef7-8013-8c1335f266ee'),
      workspaceName?: string(name='WorkspaceName', description='The name of the group.'),
    }
  ](name='Result'),
  success?: boolean(name='Success', description='Indicates whether the request was successful. Valid values:

*   true: The request was successful.
*   false: The request failed.', example='True'),
}

model QueryReportPerformanceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryReportPerformanceResponseBody(name='body'),
}

/**
 * @summary Queries report performance logs.
 *
 * @param request QueryReportPerformanceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryReportPerformanceResponse
 */
async function queryReportPerformanceWithOptions(request: QueryReportPerformanceRequest, runtime: Util.RuntimeOptions): QueryReportPerformanceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.costTimeAvgMin)) {
    query['CostTimeAvgMin'] = request.costTimeAvgMin;
  }
  if (!Util.isUnset(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.queryType)) {
    query['QueryType'] = request.queryType;
  }
  if (!Util.isUnset(request.reportId)) {
    query['ReportId'] = request.reportId;
  }
  if (!Util.isUnset(request.resourceType)) {
    query['ResourceType'] = request.resourceType;
  }
  if (!Util.isUnset(request.workspaceId)) {
    query['WorkspaceId'] = request.workspaceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryReportPerformance',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries report performance logs.
 *
 * @param request QueryReportPerformanceRequest
 * @return QueryReportPerformanceResponse
 */
async function queryReportPerformance(request: QueryReportPerformanceRequest): QueryReportPerformanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryReportPerformanceWithOptions(request, runtime);
}

model QueryShareListRequest {
  reportId?: string(name='ReportId', description='The type of work being shared. Valid values:

*   product: BI portal
*   dashboard: dashboard
*   worksheet: workbook
*   dashboardOfflineQuery: self-service data retrieval
*   Analysis: Ad hoc analysis
*   DATAFORM
*   SCREEN: Data dashboard

This parameter is required.', example='6b407e50-e774-406b-9956-da2425c2****'),
}

model QueryShareListResponseBody = {
  requestId?: string(name='RequestId', example='DC4E1E63-B337-44F8-8C22-6F00DF67E2C3'),
  result?: [ 
    {
      authPoint?: int32(name='AuthPoint', example='3'),
      expireDate?: long(name='ExpireDate', example='1640102400000'),
      reportId?: string(name='ReportId', example='6b407e50-e774-406b-9956-da2425c2****'),
      shareId?: string(name='ShareId', example='0ab9659e-29cf-47d7-a364-3a91553b****'),
      shareToId?: string(name='ShareToId', example='95296e95-ca89-4c7d-8af9-dedf0ad0****'),
      shareToName?: string(name='ShareToName'),
      shareToType?: int32(name='ShareToType', example='0'),
      shareType?: string(name='ShareType', example='product'),
    }
  ](name='Result'),
  success?: boolean(name='Success', example='true'),
}

model QueryShareListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryShareListResponseBody(name='body'),
}

/**
 * @summary Xiao Zhang
 *
 * @param request QueryShareListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryShareListResponse
 */
async function queryShareListWithOptions(request: QueryShareListRequest, runtime: Util.RuntimeOptions): QueryShareListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.reportId)) {
    query['ReportId'] = request.reportId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryShareList',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Xiao Zhang
 *
 * @param request QueryShareListRequest
 * @return QueryShareListResponse
 */
async function queryShareList(request: QueryShareListRequest): QueryShareListResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryShareListWithOptions(request, runtime);
}

model QuerySharesToUserListRequest {
  userId?: string(name='UserId', description='The ID of the user. The user ID is the UserID of the Quick BI, not the UID of Alibaba Cloud.

This parameter is required.', example='46e53****5ba4b679ee22e2a2927****'),
}

model QuerySharesToUserListResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='DC4E1E63-B337-44F8-8C22-6F00DF67E2C3'),
  result?: [ 
    {
      createTime?: string(name='CreateTime', description='The timestamp of the creation time in milliseconds.', example='1530078690000'),
      description?: string(name='Description', description='Remarks on the work.', example='Description of the test report'),
      directory?: {
        id?: string(name='Id', description='The ID of the directory where the resource is located.', example='f7f6e22b-83be-47fd-b49d-9ca686a9****'),
        name?: string(name='Name', description='The name of the resource.', example='Chart Report'),
        pathId?: string(name='PathId', description='The path ID of the directory where the resource is located.'),
        pathName?: string(name='PathName', description='The path name of the directory where the resource is located.', example='Level -1 Directory /Level -2 Directory'),
      }(name='Directory', description='Information about the directory where the work is located.'),
      modifyName?: string(name='ModifyName', description='The name of the Alibaba Cloud account to which the modifier belongs.', example='13855265****@163.com'),
      modifyTime?: string(name='ModifyTime', description='The timestamp of the modification time in milliseconds.', example='1530078690000'),
      ownerId?: string(name='OwnerId', description='The UserID of the work owner in Quickbi.', example='74f5527216d14e9892245320ebf2****'),
      ownerName?: string(name='OwnerName', description='The Alibaba Cloud account name of the work owner.', example='w****@aliyun.com'),
      securityLevel?: string(name='SecurityLevel', description='Security policies for collaborative authorization of works. Valid values:

*   0: private
*   12: Authorize specified members
*   1 or 11: Authorize all workspace members

> 

*   If you use legacy permissions, the return value is 1.

*   If you use the new permissions, the return value is 11.', example='0'),
      status?: int32(name='Status', description='The publishing status of the report. Valid values:

*   0: unpublished
*   1: published
*   2: modified but not published
*   3: unpublished', example='1'),
      thirdPartAuthFlag?: int32(name='ThirdPartAuthFlag', description='Third-party embedding status. Valid values:

*   0: No embedding is enabled.
*   1: Embed is enabled.', example='0'),
      workName?: string(name='WorkName', description='The name of the report.', example='Test report'),
      workType?: string(name='WorkType', description='The type of the work. Valid values:

*   DATAPRODUCT: BI portal
*   PAGE: Dashboard
*   FULLPAGE: full-screen dashboards
*   REPORT: workbook
*   dashboardOfflineQuery: self-service data retrieval', example='DATAFORM'),
      worksId?: string(name='WorksId', description='The ID of the operations report.', example='97f7f4c1-543a-4069-8e8d-a56cfcd6****'),
      workspaceId?: string(name='WorkspaceId', description='The ID of the workspace to which the report belongs.', example='c5f86ad2-ef53-4c51-8720-162ecfdb****'),
      workspaceName?: string(name='WorkspaceName', description='The name of the workspace to which the report belongs.', example='Return to Professional Edition'),
    }
  ](name='Result', description='Returns a list of works authorized to the user.'),
  success?: boolean(name='Success', description='Indicates whether the request is successful. Valid values:

*   true: The request was successful.
*   false: The request failed.', example='true'),
}

model QuerySharesToUserListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QuerySharesToUserListResponseBody(name='body'),
}

/**
 * @summary You can call this operation to query the list of works authorized to a user.
 *
 * @param request QuerySharesToUserListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QuerySharesToUserListResponse
 */
async function querySharesToUserListWithOptions(request: QuerySharesToUserListRequest, runtime: Util.RuntimeOptions): QuerySharesToUserListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.userId)) {
    query['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QuerySharesToUserList',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary You can call this operation to query the list of works authorized to a user.
 *
 * @param request QuerySharesToUserListRequest
 * @return QuerySharesToUserListResponse
 */
async function querySharesToUserList(request: QuerySharesToUserListRequest): QuerySharesToUserListResponse {
  var runtime = new Util.RuntimeOptions{};
  return querySharesToUserListWithOptions(request, runtime);
}

model QuerySmartqPermissionByCubeIdRequest {
  cubeId?: string(name='CubeId', description='This parameter is required.', example='7c7223ae-****-3c744528014b'),
  userId?: string(name='UserId', description='This parameter is required.', example='95c4d**************3852e202'),
}

model QuerySmartqPermissionByCubeIdResponseBody = {
  requestId?: string(name='RequestId', example='617277******************ABA47E31'),
  result?: {
    cubeId?: string(name='CubeId', example='7c7223ae-****-3c744528014b'),
    cubeName?: string(name='CubeName', example='test'),
    hasPerssion?: boolean(name='HasPerssion'),
  }(name='Result'),
  success?: boolean(name='Success', example='true'),
}

model QuerySmartqPermissionByCubeIdResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QuerySmartqPermissionByCubeIdResponseBody(name='body'),
}

/**
 * @summary 查看用户是否有某个智能问数数据集权限
 *
 * @param request QuerySmartqPermissionByCubeIdRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QuerySmartqPermissionByCubeIdResponse
 */
async function querySmartqPermissionByCubeIdWithOptions(request: QuerySmartqPermissionByCubeIdRequest, runtime: Util.RuntimeOptions): QuerySmartqPermissionByCubeIdResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.cubeId)) {
    query['CubeId'] = request.cubeId;
  }
  if (!Util.isUnset(request.userId)) {
    query['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QuerySmartqPermissionByCubeId',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 查看用户是否有某个智能问数数据集权限
 *
 * @param request QuerySmartqPermissionByCubeIdRequest
 * @return QuerySmartqPermissionByCubeIdResponse
 */
async function querySmartqPermissionByCubeId(request: QuerySmartqPermissionByCubeIdRequest): QuerySmartqPermissionByCubeIdResponse {
  var runtime = new Util.RuntimeOptions{};
  return querySmartqPermissionByCubeIdWithOptions(request, runtime);
}

model QueryTicketInfoRequest {
  ticket?: string(name='Ticket', description='Obtains the details of a specified ticket for a report that is not embedded in the report.

This parameter is required.', example='a27a9aec-****-****-bd40-1a21ea41d7c5'),
}

model QueryTicketInfoResponseBody = {
  requestId?: string(name='RequestId', example='D787E1A3-A93C-424A-B626-C2B05DF8D885'),
  result?: {
    accessTicket?: string(name='AccessTicket', example='a27a9aec-****-****-bd40-1a21ea41d7c5'),
    cmptId?: string(name='CmptId', example='sfdgsds-****-****-a608-mghdgd'),
    globalParam?: string(name='GlobalParam'),
    invalidTime?: string(name='InvalidTime', example='2022-01-30 03:03:49'),
    maxTicketNum?: int32(name='MaxTicketNum', example='9999'),
    organizationId?: string(name='OrganizationId', example='2fe4fbd8-****-****-b3e1-e92c7af083ea'),
    registerTime?: string(name='RegisterTime', example='2022-01-09 22:23:49'),
    usedTicketNum?: int32(name='UsedTicketNum', example='47'),
    userId?: string(name='UserId', example='974e50**********9033f46'),
    watermarkParam?: string(name='WatermarkParam'),
    worksId?: string(name='WorksId', example='ccd3428c-****-****-a608-26bae29dffee'),
  }(name='Result'),
  success?: boolean(name='Success', example='true'),
}

model QueryTicketInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryTicketInfoResponseBody(name='body'),
}

/**
 * @summary auditing
 *
 * @param request QueryTicketInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryTicketInfoResponse
 */
async function queryTicketInfoWithOptions(request: QueryTicketInfoRequest, runtime: Util.RuntimeOptions): QueryTicketInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ticket)) {
    query['Ticket'] = request.ticket;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryTicketInfo',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary auditing
 *
 * @param request QueryTicketInfoRequest
 * @return QueryTicketInfoResponse
 */
async function queryTicketInfo(request: QueryTicketInfoRequest): QueryTicketInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryTicketInfoWithOptions(request, runtime);
}

model QueryUserGroupListByParentIdRequest {
  parentUserGroupId?: string(name='ParentUserGroupId', description='The ID of the parent user group.

*   If you enter the ID of the parent user group, you can obtain the information of the child user group under this ID.
*   If you enter -1, you can obtain the sub-user group information under the root directory.

This parameter is required.', example='3d2c23d4-2b41-4af8-a1f5-f6390f32****'),
}

model QueryUserGroupListByParentIdResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='72B19D61-B37A-5C7A-9389-0856CD7935B3'),
  result?: [ 
    {
      createTime?: string(name='CreateTime', description='The time when the sub-user group was created.', example='2020-10-30 10:03:09'),
      createUser?: string(name='CreateUser', description='The creator of the sub-user group. The UserID of the Quick BI is used instead of the UID of Alibaba Cloud.', example='136516262323****'),
      identifiedPath?: string(name='IdentifiedPath', description='Directory level of the sub-user group.'),
      modifiedTime?: string(name='ModifiedTime', description='The time when the sub-user group was last modified.', example='2020-11-16 15:49:08'),
      modifyUser?: string(name='ModifyUser', description='The user who modified the subgroup. The UserID of the Quick BI is used instead of the UID of Alibaba Cloud.', example='136516262323****'),
      parentUserGroupId?: string(name='ParentUserGroupId', description='The ID of the parent user group.', example='3d2c23d4-2b41-4af8-a1f5-f6390f32****'),
      userGroupDescription?: string(name='UserGroupDescription', description='The description of the sub-user group.', example='User Group for Testing'),
      userGroupId?: string(name='UserGroupId', description='The ID of the sub-user group.', example='f5eeb52e-d9c2-4a8b-80e3-47ab55c2****'),
      userGroupName?: string(name='UserGroupName', description='The name of the sub-user group.', example='popapi test group'),
    }
  ](name='Result', description='The information about the sub-user group.'),
  success?: boolean(name='Success', description='Indicates whether the request is successful. Valid values:

*   true: The request was successful.
*   false: The request failed.', example='true'),
}

model QueryUserGroupListByParentIdResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryUserGroupListByParentIdResponseBody(name='body'),
}

/**
 * @summary You can this operation to obtain information about child user groups under a specified parent user group.
 *
 * @param request QueryUserGroupListByParentIdRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryUserGroupListByParentIdResponse
 */
async function queryUserGroupListByParentIdWithOptions(request: QueryUserGroupListByParentIdRequest, runtime: Util.RuntimeOptions): QueryUserGroupListByParentIdResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.parentUserGroupId)) {
    query['ParentUserGroupId'] = request.parentUserGroupId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryUserGroupListByParentId',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary You can this operation to obtain information about child user groups under a specified parent user group.
 *
 * @param request QueryUserGroupListByParentIdRequest
 * @return QueryUserGroupListByParentIdResponse
 */
async function queryUserGroupListByParentId(request: QueryUserGroupListByParentIdRequest): QueryUserGroupListByParentIdResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryUserGroupListByParentIdWithOptions(request, runtime);
}

model QueryUserGroupMemberRequest {
  keyword?: string(name='Keyword'),
  userGroupId?: string(name='UserGroupId', description='This parameter is required.', example='2fe4fbd8-588f-489a-b3e1-e92c7af0****'),
}

model QueryUserGroupMemberResponseBody = {
  requestId?: string(name='RequestId', example='48C930FF-DFCF-5986-902B-E24C202E2443'),
  result?: [ 
    {
      id?: string(name='Id', example='3d2c23d4-2b41-4af8-a1f5-f6390f32****'),
      isUserGroup?: boolean(name='IsUserGroup', example='true'),
      name?: string(name='Name'),
      parentUserGroupId?: string(name='ParentUserGroupId', example='2fe4fbd8-588f-489a-b3e1-e92c7af0****'),
      parentUserGroupName?: string(name='ParentUserGroupName'),
    }
  ](name='Result'),
  success?: boolean(name='Success', example='true'),
}

model QueryUserGroupMemberResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryUserGroupMemberResponseBody(name='body'),
}

/**
 * @summary 获取用户组下的成员列表信息。
 *
 * @param request QueryUserGroupMemberRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryUserGroupMemberResponse
 */
async function queryUserGroupMemberWithOptions(request: QueryUserGroupMemberRequest, runtime: Util.RuntimeOptions): QueryUserGroupMemberResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.keyword)) {
    query['Keyword'] = request.keyword;
  }
  if (!Util.isUnset(request.userGroupId)) {
    query['UserGroupId'] = request.userGroupId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryUserGroupMember',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 获取用户组下的成员列表信息。
 *
 * @param request QueryUserGroupMemberRequest
 * @return QueryUserGroupMemberResponse
 */
async function queryUserGroupMember(request: QueryUserGroupMemberRequest): QueryUserGroupMemberResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryUserGroupMemberWithOptions(request, runtime);
}

model QueryUserInfoByAccountRequest {
  account?: string(name='Account', description='Enter the name or ID of the Alibaba Cloud account that you want to query.

*   When you enter an account name:

    *   If the organization user is a master account, such as main_account, the query account format is master account. That is, the main account main_account to be entered.
    *   If the organization user is a RAM user, such as a <zhangsan@test.onaliyun.com>, the query account format is the head of the RAM user, that is, the RAM user to be entered is zhangsan.

*   ID:

    *   Enter the UID of the account to query the account information.

This parameter is required.', example='1386587****@163.com'),
  parentAccountName?: string(name='ParentAccountName', description='当查询子账号出现重复报错时，输入主账号的账号名，
例如zhangsan@test.onaliyun.com。', example='zhangsan@test.onaliyun.com'),
}

model QueryUserInfoByAccountResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='D787E1A3-A93C-424A-B626-C2B05DF8D885'),
  result?: {
    accountId?: string(name='AccountId', description='The ID of the Alibaba Cloud account.', example='135****5848'),
    accountName?: string(name='AccountName', description='The name of the Alibaba Cloud account that corresponds to the member. (If you use a RAM user, the domain name information that follows @ is removed. For example, if you use a <test@test.com>, test is returned.)', example='1386587****@163.com'),
    adminUser?: boolean(name='AdminUser', description='Whether you are an administrator of the organization. Valid values:

*   true
*   false', example='true'),
    authAdminUser?: boolean(name='AuthAdminUser', description='Whether you are a permission administrator. Valid values:

*   true
*   false', example='true'),
    email?: string(name='Email', description='The email address of the user.', example='1386587****@163.com'),
    nickName?: string(name='NickName', description='The nickname of the account.', example='Test user'),
    phone?: string(name='Phone', description='The phone number of the alert contact.', example='1386587****'),
    roleIdList?: [ long ](name='RoleIdList', description='用户绑定的组织角色ID列表。'),
    userId?: string(name='UserId', description='The UserID in the Quick BI.', example='fe67f61a35a94b7da1a34ba174a7****'),
    userType?: int32(name='UserType', description='The role type of the organization member. Valid values:

*   1 : developer
*   2 : visitors
*   3 : Analyst', example='1'),
  }(name='Result', description='The returned organization user information.'),
  success?: boolean(name='Success', description='Indicates whether the request is successful. Valid values:

*   true: The request was successful.
*   false: The request failed.', example='true'),
}

model QueryUserInfoByAccountResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryUserInfoByAccountResponseBody(name='body'),
}

/**
 * @summary Queries user information based on the Alibaba Cloud ID or Alibaba Cloud account name.
 *
 * @param request QueryUserInfoByAccountRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryUserInfoByAccountResponse
 */
async function queryUserInfoByAccountWithOptions(request: QueryUserInfoByAccountRequest, runtime: Util.RuntimeOptions): QueryUserInfoByAccountResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.account)) {
    query['Account'] = request.account;
  }
  if (!Util.isUnset(request.parentAccountName)) {
    query['ParentAccountName'] = request.parentAccountName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryUserInfoByAccount',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries user information based on the Alibaba Cloud ID or Alibaba Cloud account name.
 *
 * @param request QueryUserInfoByAccountRequest
 * @return QueryUserInfoByAccountResponse
 */
async function queryUserInfoByAccount(request: QueryUserInfoByAccountRequest): QueryUserInfoByAccountResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryUserInfoByAccountWithOptions(request, runtime);
}

model QueryUserInfoByUserIdRequest {
  userId?: string(name='UserId', description='The ID of the user. The UserID is the UserID of the Quick BI, not the UID of Alibaba Cloud.

This parameter is required.', example='fe67f61a35a94b7da1a34ba174a7****'),
}

model QueryUserInfoByUserIdResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='D787E1A3-A93C-424A-B626-C2B05DF8D885'),
  result?: {
    accountId?: string(name='AccountId', description='The ID of the Alibaba Cloud account.', example='135****5848'),
    accountName?: string(name='AccountName', description='The name of the Alibaba Cloud account that corresponds to the member.', example='1386587****@163.com'),
    adminUser?: boolean(name='AdminUser', description='Whether you are an administrator of the organization. Valid values:

*   true
*   false', example='true'),
    authAdminUser?: boolean(name='AuthAdminUser', description='Whether you are a permission administrator. Valid values:

*   true
*   false', example='true'),
    email?: string(name='Email', description='The email address of the user.', example='1386587****@163.com'),
    nickName?: string(name='NickName', description='The nickname of the account.', example='Test user'),
    phone?: string(name='Phone', description='The phone number of the alert contact.', example='1386587****'),
    roleIdList?: [ long ](name='RoleIdList'),
    userId?: string(name='UserId', description='The UserID in the Quick BI.', example='fe67f61a35a94b7da1a34ba174a7****'),
    userType?: int32(name='UserType', description='The role type of the organization member. Valid values:

*   1 : developer
*   2 : visitors
*   3 : Analyst', example='1'),
  }(name='Result', description='The returned organization user information.'),
  success?: boolean(name='Success', description='Indicates whether the request is successful. Valid values:

*   true: The request was successful.
*   false: The request failed.', example='true'),
}

model QueryUserInfoByUserIdResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryUserInfoByUserIdResponseBody(name='body'),
}

/**
 * @summary Queries user information based on the user ID.
 *
 * @param request QueryUserInfoByUserIdRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryUserInfoByUserIdResponse
 */
async function queryUserInfoByUserIdWithOptions(request: QueryUserInfoByUserIdRequest, runtime: Util.RuntimeOptions): QueryUserInfoByUserIdResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.userId)) {
    query['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryUserInfoByUserId',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries user information based on the user ID.
 *
 * @param request QueryUserInfoByUserIdRequest
 * @return QueryUserInfoByUserIdResponse
 */
async function queryUserInfoByUserId(request: QueryUserInfoByUserIdRequest): QueryUserInfoByUserIdResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryUserInfoByUserIdWithOptions(request, runtime);
}

model QueryUserListRequest {
  keyword?: string(name='Keyword'),
  pageNum?: int32(name='PageNum', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
}

model QueryUserListResponseBody = {
  requestId?: string(name='RequestId', example='D787E1A3-A93C-424A-B626-C2B05DF8D885'),
  result?: {
    data?: [ 
      {
        accountId?: string(name='AccountId', example='1355********'),
        accountName?: string(name='AccountName'),
        adminUser?: boolean(name='AdminUser', example='true'),
        authAdminUser?: boolean(name='AuthAdminUser', example='true'),
        isDeleted?: boolean(name='IsDeleted'),
        joinedDate?: long(name='JoinedDate'),
        lastLoginTime?: long(name='LastLoginTime'),
        nickName?: string(name='NickName'),
        roleIdList?: [ long ](name='RoleIdList'),
        userId?: string(name='UserId', example='fe67f61a35a94b7da1a34ba174a7****'),
        userType?: int32(name='UserType', example='1'),
      }
    ](name='Data'),
    pageNum?: int32(name='PageNum', example='1'),
    pageSize?: int32(name='PageSize', example='10'),
    totalNum?: int32(name='TotalNum', example='1'),
    totalPages?: int32(name='TotalPages', example='1'),
  }(name='Result'),
  success?: boolean(name='Success', example='true'),
}

model QueryUserListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryUserListResponseBody(name='body'),
}

/**
 * @summary 查询组织成员列表信息。
 *
 * @param request QueryUserListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryUserListResponse
 */
async function queryUserListWithOptions(request: QueryUserListRequest, runtime: Util.RuntimeOptions): QueryUserListResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryUserList',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 查询组织成员列表信息。
 *
 * @param request QueryUserListRequest
 * @return QueryUserListResponse
 */
async function queryUserList(request: QueryUserListRequest): QueryUserListResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryUserListWithOptions(request, runtime);
}

model QueryUserRoleInfoInWorkspaceRequest {
  userId?: string(name='UserId', description='This parameter is required.', example='f5698bedeb384b1986afccd9e434****'),
  workspaceId?: string(name='WorkspaceId', description='This parameter is required.', example='95296e95-ca89-4c7d-8af9-dedf0ad0****'),
}

model QueryUserRoleInfoInWorkspaceResponseBody = {
  requestId?: string(name='RequestId', example='D787E1A3-A93C-424A-B626-C2B05DF8D885'),
  result?: {
    roleCode?: string(name='RoleCode', example='role_workspace_admin'),
    roleId?: long(name='RoleId', example='25'),
    roleName?: string(name='RoleName'),
  }(name='Result'),
  success?: boolean(name='Success', example='true'),
}

model QueryUserRoleInfoInWorkspaceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryUserRoleInfoInWorkspaceResponseBody(name='body'),
}

/**
 * @summary 获取指定工作空间成员的预置空间角色信息。
 *
 * @param request QueryUserRoleInfoInWorkspaceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryUserRoleInfoInWorkspaceResponse
 */
async function queryUserRoleInfoInWorkspaceWithOptions(request: QueryUserRoleInfoInWorkspaceRequest, runtime: Util.RuntimeOptions): QueryUserRoleInfoInWorkspaceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.userId)) {
    query['UserId'] = request.userId;
  }
  if (!Util.isUnset(request.workspaceId)) {
    query['WorkspaceId'] = request.workspaceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryUserRoleInfoInWorkspace',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 获取指定工作空间成员的预置空间角色信息。
 *
 * @param request QueryUserRoleInfoInWorkspaceRequest
 * @return QueryUserRoleInfoInWorkspaceResponse
 */
async function queryUserRoleInfoInWorkspace(request: QueryUserRoleInfoInWorkspaceRequest): QueryUserRoleInfoInWorkspaceResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryUserRoleInfoInWorkspaceWithOptions(request, runtime);
}

model QueryUserTagMetaListResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='D787E1A3-A93C-424A-B626-C2B05DF8D885'),
  result?: [ 
    {
      tagDescription?: string(name='TagDescription', description='The description of the tag.', example='Used to distinguish some positions'),
      tagId?: string(name='TagId', description='The ID of the label.', example='pop_001'),
      tagName?: string(name='TagName', description='The name of the tag.', example='Position'),
    }
  ](name='Result', description='Returns a list of user tags in an organization.'),
  success?: boolean(name='Success', description='Indicates whether the request is successful. Valid values:

*   true: The request was successful.
*   false: The request failed.', example='true'),
}

model QueryUserTagMetaListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryUserTagMetaListResponseBody(name='body'),
}

/**
 * @summary Queries the metadata list of member tags in an organization.
 *
 * @param request QueryUserTagMetaListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryUserTagMetaListResponse
 */
async function queryUserTagMetaListWithOptions(runtime: Util.RuntimeOptions): QueryUserTagMetaListResponse {
  var req = new OpenApi.OpenApiRequest{};
  var params = new OpenApi.Params{
    action = 'QueryUserTagMetaList',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the metadata list of member tags in an organization.
 *
 * @return QueryUserTagMetaListResponse
 */
async function queryUserTagMetaList(): QueryUserTagMetaListResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryUserTagMetaListWithOptions(runtime);
}

model QueryUserTagValueListRequest {
  userId?: string(name='UserId', description='This UserID refers to the Quick BI UserID, not the Alibaba Cloud UID.

This parameter is required.', example='fe67f61a35a94b7da1a34ba174a7****'),
}

model QueryUserTagValueListResponseBody = {
  requestId?: string(name='RequestId', description='Request ID.', example='D787E1A3-A93C-424A-B626-C2B05DF8D885'),
  result?: [ 
    {
      tagId?: string(name='TagId', description='Tag ID.', example='pop_001'),
      tagName?: string(name='TagName', description='Tag name.', example='Position'),
      tagValue?: string(name='TagValue', description='The value of the tag.', example='Supervisor'),
    }
  ](name='Result', description='The result of the request for a list of user tags and their values.'),
  success?: boolean(name='Success', description='Indicates whether the request was successful. Possible values:

- true: The request was successful.
- false: The request failed.', example='true'),
}

model QueryUserTagValueListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryUserTagValueListResponseBody(name='body'),
}

/**
 * @summary Query the list of specific user tag values.
 *
 * @param request QueryUserTagValueListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryUserTagValueListResponse
 */
async function queryUserTagValueListWithOptions(request: QueryUserTagValueListRequest, runtime: Util.RuntimeOptions): QueryUserTagValueListResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryUserTagValueList',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Query the list of specific user tag values.
 *
 * @param request QueryUserTagValueListRequest
 * @return QueryUserTagValueListResponse
 */
async function queryUserTagValueList(request: QueryUserTagValueListRequest): QueryUserTagValueListResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryUserTagValueListWithOptions(request, runtime);
}

model QueryWorksRequest {
  worksId?: string(name='WorksId', description='This parameter is required.', example='abcd****'),
}

model QueryWorksResponseBody = {
  requestId?: string(name='RequestId', example='D787E1A3-A93C-424A-B626-C2B05DF8D885'),
  result?: {
    auth3rdFlag?: int32(name='Auth3rdFlag', example='0'),
    description?: string(name='Description'),
    directory?: {
      id?: string(name='Id', example='83d37ba6-d909-48a2-a517-f4d05c3a****'),
      name?: string(name='Name'),
      pathId?: string(name='PathId', example='83d37ba6-d909-48a2-a517-f4d05c3a****'),
      pathName?: string(name='PathName'),
    }(name='Directory'),
    gmtCreate?: string(name='GmtCreate', example='1496651577000'),
    gmtModify?: string(name='GmtModify', example='1496651577000'),
    modifyName?: string(name='ModifyName'),
    ownerId?: string(name='OwnerId', example='9187a612aa474e2a8ac1414d5529****'),
    ownerName?: string(name='OwnerName'),
    publicFlag?: boolean(name='PublicFlag'),
    publicInvalidTime?: long(name='PublicInvalidTime'),
    securityLevel?: string(name='SecurityLevel', example='0'),
    status?: int32(name='Status', example='0'),
    workName?: string(name='WorkName'),
    workType?: string(name='WorkType', example='PAGE'),
    worksId?: string(name='WorksId', example='95296e95-ca89-4c7d-8af9-dedf0ad0****'),
    workspaceId?: string(name='WorkspaceId', example='87c6b145-090c-43e1-9426-8f93be23****'),
    workspaceName?: string(name='WorkspaceName'),
  }(name='Result'),
  success?: boolean(name='Success', example='true'),
}

model QueryWorksResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryWorksResponseBody(name='body'),
}

/**
 * @summary 获取报表详情
 *
 * @param request QueryWorksRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryWorksResponse
 */
async function queryWorksWithOptions(request: QueryWorksRequest, runtime: Util.RuntimeOptions): QueryWorksResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.worksId)) {
    query['WorksId'] = request.worksId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryWorks',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 获取报表详情
 *
 * @param request QueryWorksRequest
 * @return QueryWorksResponse
 */
async function queryWorks(request: QueryWorksRequest): QueryWorksResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryWorksWithOptions(request, runtime);
}

model QueryWorksBloodRelationshipRequest {
  worksId?: string(name='WorksId', description='Obtains the kinship of a data work, including the datasets referenced by each component and query field information. Currently, only supported data works include dashboards, workbooks, and self-service data retrieval.

This parameter is required.', example='abcd****'),
}

model QueryWorksBloodRelationshipResponseBody = {
  requestId?: string(name='RequestId', description='Indicates whether the request is successful. Valid values:

*   true: The request was successful.
*   false: The request failed.', example='D787E1A3-A93C-424A-B626-C2B05DF8D885'),
  result?: [ 
    {
      componentId?: string(name='ComponentId', description='List of work blood information.', example='0696083a-ca72-4d89-8e7a-c017910e0***'),
      componentName?: string(name='ComponentName', description='The ID of the component that you want to modify.', example='The name of the component.'),
      componentType?: int32(name='ComponentType', description='Line', example='3'),
      componentTypeCnName?: string(name='ComponentTypeCnName'),
      componentTypeName?: string(name='ComponentTypeName', description='The type of the image component.', example='LINE'),
      datasetId?: string(name='DatasetId', description='Column (Measure)', example='dc78a4ed-880d-452e-b017-90cfc10c83e5_company_sales_record'),
      queryParams?: [ 
        {
          areaId?: string(name='AreaId', description='Indices whether the metric. Valid values:

true false', example='area_column'),
          areaName?: string(name='AreaName', description='The ID of the owning location.', example='The name of the owning location.'),
          caption?: string(name='Caption', description='The globally unique PathId.', example='order_number'),
          dataType?: string(name='DataType', description='The display name of the field.', example='number'),
          expression?: string(name='Expression'),
          isMeasure?: boolean(name='IsMeasure', description='The type of the field. Valid values:

*   string: string type
*   date: a date type that contains only the year, month, and day parts
*   datetime: a common date type
*   time: a date type that contains only hours, minutes, and seconds.
*   number: numeric
*   boolean: Boolean type
*   geographical: geographical location
*   url: string type
*   imageUrl: the type of the image link.
*   multivalue: a multi-value column', example='true'),
          pathId?: string(name='PathId', description='The unique ID of the field.', example='schema7d1944eb-443e-48c6-8123-bf45a99e7e74.dc78a4ed-880d-452e-b017-90cfc10c83e5_company_sales_record.[Ndc78a4_order_level].[Ndc78a4_order_level].[Ndc78a4_order_level]'),
          uid?: string(name='Uid', description='A list of query parameter reference columns.', example='Ndc78a4_order_number'),
        }
      ](name='QueryParams', description='The name of the component type.'),
    }
  ](name='Result', description='The ID of the request.'),
  success?: boolean(name='Success', description='The response.', example='true'),
}

model QueryWorksBloodRelationshipResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryWorksBloodRelationshipResponseBody(name='body'),
}

/**
 * @summary abcd****
 *
 * @param request QueryWorksBloodRelationshipRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryWorksBloodRelationshipResponse
 */
async function queryWorksBloodRelationshipWithOptions(request: QueryWorksBloodRelationshipRequest, runtime: Util.RuntimeOptions): QueryWorksBloodRelationshipResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.worksId)) {
    query['WorksId'] = request.worksId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryWorksBloodRelationship',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary abcd****
 *
 * @param request QueryWorksBloodRelationshipRequest
 * @return QueryWorksBloodRelationshipResponse
 */
async function queryWorksBloodRelationship(request: QueryWorksBloodRelationshipRequest): QueryWorksBloodRelationshipResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryWorksBloodRelationshipWithOptions(request, runtime);
}

model QueryWorksByOrganizationRequest {
  pageNum?: int32(name='PageNum', description='The page number of the returned page.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of rows per page set when the interface is requested.', example='10'),
  status?: int32(name='Status', description='Returns a list of all works in the organization that meet the requested criteria.', example='0'),
  thirdPartAuthFlag?: int32(name='ThirdPartAuthFlag', description='The total number of pages returned.', example='1'),
  worksType?: string(name='WorksType', description='The ID of the request.', example='PAGE'),
}

model QueryWorksByOrganizationResponseBody = {
  requestId?: string(name='RequestId', description='The details of the list of works.', example='D787E1A3-A93C-424A-B626-C2B05DF8D885'),
  result?: {
    data?: [ 
      {
        auth3rdFlag?: int32(name='Auth3rdFlag', description='The name of the workspace to which the work belongs.', example='1'),
        description?: string(name='Description', description='The hierarchical structure of the directory ID to which the directory belongs. Separate the hierarchical structure with a /.', example='The hierarchical structure of the directory to which the directory belongs. Separate the hierarchical structure with a (/).'),
        directory?: {
          id?: string(name='Id', example='83d37ba6-d909-48a2-a517-f4d05c3a****'),
          name?: string(name='Name'),
          pathId?: string(name='PathId', example='83d37ba6-d909-48a2-a517-f4d05c3a****'),
          pathName?: string(name='PathName'),
        }(name='Directory', description='The ID of the directory.'),
        gmtCreate?: string(name='GmtCreate', description='Test directory', example='1496651577000'),
        gmtModify?: string(name='GmtModify', description='Test Workspace', example='1572334870000'),
        modifyName?: string(name='ModifyName', description='Description', example='The name of the work.'),
        ownerId?: string(name='OwnerId', description='Security policies for collaborative authorization of works. Valid values:

*   0: private
*   12: Authorize specified members
*   1 or 11: Authorize all workspace members

> 

*   If you use legacy permissions, the return value is 1.

*   If you use the new permissions, the return value is 11.', example='Remarks on the work.'),
        ownerName?: string(name='OwnerName', description='The Alibaba Cloud account name of the person who modified the work.', example='Tom'),
        publicFlag?: boolean(name='PublicFlag'),
        publicInvalidTime?: long(name='PublicInvalidTime'),
        securityLevel?: string(name='SecurityLevel', description='The directory to which the work belongs.', example='1'),
        status?: int32(name='Status', description='Li Si', example='1'),
        workName?: string(name='WorkName', description='Test directory', example='The name of the directory.'),
        workType?: string(name='WorkType', description='The name of the workspace to which the work belongs.', example='PAGE'),
        worksId?: string(name='WorksId', description='The user ID of the work owner in the Quick BI.', example='897ce25e-****-****-af84-d13c5610****'),
        workspaceId?: string(name='WorkspaceId', description='Test report', example='The timestamp of the creation of the work in milliseconds.'),
        workspaceName?: string(name='WorkspaceName', description='The ID of the workspace to which the work belongs.', example='The name of the Alibaba Cloud account that modified the work.'),
      }
    ](name='Data', description='The Alibaba Cloud account name of the work owner.'),
    pageNum?: int32(name='PageNum', description='The timestamp of the modification of the work in milliseconds.', example='1'),
    pageSize?: int32(name='PageSize', description='The ID of the work.', example='10'),
    totalNum?: int32(name='TotalNum', description='The type of the work. Valid values:

*   DATAPRODUCT: BI portal
*   PAGE: Dashboard
*   FULLPAGE: full-screen dashboards
*   REPORT: workbook', example='1'),
    totalPages?: int32(name='TotalPages', description='Third-party embedding status. Valid values:

*   0: The embed service is not enabled.
*   1: Embed is enabled.', example='1'),
  }(name='Result', description='The status of the report. Valid values:

*   0: unpublished
*   1: published
*   2: modified but not published
*   3: unpublished'),
  success?: boolean(name='Success', description='The total number of rows in the table.', example='true'),
}

model QueryWorksByOrganizationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryWorksByOrganizationResponseBody(name='body'),
}

/**
 * @summary The total number of rows in the table.
 *
 * @param request QueryWorksByOrganizationRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryWorksByOrganizationResponse
 */
async function queryWorksByOrganizationWithOptions(request: QueryWorksByOrganizationRequest, runtime: Util.RuntimeOptions): QueryWorksByOrganizationResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.status)) {
    query['Status'] = request.status;
  }
  if (!Util.isUnset(request.thirdPartAuthFlag)) {
    query['ThirdPartAuthFlag'] = request.thirdPartAuthFlag;
  }
  if (!Util.isUnset(request.worksType)) {
    query['WorksType'] = request.worksType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryWorksByOrganization',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary The total number of rows in the table.
 *
 * @param request QueryWorksByOrganizationRequest
 * @return QueryWorksByOrganizationResponse
 */
async function queryWorksByOrganization(request: QueryWorksByOrganizationRequest): QueryWorksByOrganizationResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryWorksByOrganizationWithOptions(request, runtime);
}

model QueryWorksByWorkspaceRequest {
  pageNum?: int32(name='PageNum', description='The page number of the returned page.

*   Default value: 1.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries returned per page.

*   Default value: 10.', example='10'),
  status?: int32(name='Status', description='The status of the work. Valid values:

*   0: unpublished
*   1: published
*   2: modified but not published
*   3: unpublished', example='0'),
  thirdPartAuthFlag?: int32(name='ThirdPartAuthFlag', description='Third-party embedding status. Valid values:

*   0: The embed service is not enabled.
*   1: Embed is enabled.', example='0'),
  worksType?: string(name='WorksType', description='The type of the work. Valid values:

*   DATAPRODUCT: BI portal
*   PAGE: Dashboard
*   FULLPAGE: full-screen dashboards
*   REPORT: workbook', example='PAGE'),
  workspaceId?: string(name='WorkspaceId', description='The ID of the workspace.

This parameter is required.', example='89713491-cb4f-4579-b889-e82c35f1****'),
}

model QueryWorksByWorkspaceResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='D787E1A3-A93C-424A-B626-C2B05DF8D885'),
  result?: {
    data?: [ 
      {
        auth3rdFlag?: int32(name='Auth3rdFlag', description='Third-party embedding status. Valid values:

*   0: The embed service is not enabled.
*   1: Embed is enabled.', example='1'),
        description?: string(name='Description', description='Remarks on the work.', example='Description'),
        directory?: {
          id?: string(name='Id', example='83d37ba6-d909-48a2-a517-f4d05c3a****'),
          name?: string(name='Name'),
          pathId?: string(name='PathId', description='The hierarchical structure of the directory ID to which the directory belongs. Separate the hierarchical structure with a /.', example='83d37ba6-d909-48a2-a517-f4d05c3a****'),
          pathName?: string(name='PathName', description='The hierarchical structure of the directory to which the directory belongs. Separate the hierarchical structure with a (/).', example='Test directory'),
        }(name='Directory', description='The directory to which the work belongs.'),
        gmtCreate?: string(name='GmtCreate', description='The timestamp of the creation of the work in milliseconds.', example='1496651577000'),
        gmtModify?: string(name='GmtModify', description='The timestamp of the modification of the work in milliseconds.', example='1572334870000'),
        modifyName?: string(name='ModifyName', description='Nickname of the work modifier.', example='Tom'),
        ownerId?: string(name='OwnerId', description='The user ID of the work owner in the Quick BI.', example='The name of the workspace to which the work belongs.'),
        ownerName?: string(name='OwnerName', description='The nickname of the work owner.', example='Li Si'),
        publicFlag?: boolean(name='PublicFlag'),
        publicInvalidTime?: long(name='PublicInvalidTime'),
        securityLevel?: string(name='SecurityLevel', description='Security policies for collaborative authorization of works. Valid values:

*   0: private
*   12: Authorize specified members
*   1 or 11: Authorize all workspace members

> 

*   If you use legacy permissions, the return value is 1.

*   If you use the new permissions, the return value is 11.', example='0'),
        status?: int32(name='Status', description='Status of dashboards, full-screen dashboards, spreadsheets. The default value of other work types is 1. Valid values:

*   0: unpublished
*   1: published
*   2: modified but not published
*   3: unpublished', example='1'),
        workName?: string(name='WorkName', description='The name of the work.', example='Test report'),
        workType?: string(name='WorkType', description='The type of the work. Valid values:

*   DATAPRODUCT: BI portal
*   PAGE: Dashboard
*   FULLPAGE: full-screen dashboards
*   REPORT: workbook
*   dashboardOfflineQuery: self-service data retrieval
*   Analysis: Ad hoc analysis
*   DATAFORM: form filling', example='PAGE'),
        worksId?: string(name='WorksId', description='The ID of the work.', example='897ce25e-f993-4abd-af84-d13c5610****'),
        workspaceId?: string(name='WorkspaceId', description='The ID of the workspace to which the work belongs.', example='87c6b145-090c-43e1-9426-8f93be23****'),
        workspaceName?: string(name='WorkspaceName', description='The name of the workspace to which the work belongs.', example='Test Workspace'),
      }
    ](name='Data', description='The details of the list of works.'),
    pageNum?: int32(name='PageNum', description='The page number of the returned page.', example='1'),
    pageSize?: int32(name='PageSize', description='The number of rows per page set when the interface is requested.', example='10'),
    totalNum?: int32(name='TotalNum', description='The total number of rows in the table.', example='1'),
    totalPages?: int32(name='TotalPages', description='The total number of pages returned.', example='1'),
  }(name='Result', description='Returns a list of all works in the organization workspace that meet the requested criteria.'),
  success?: boolean(name='Success', description='Indicates whether the request is successful. Valid values:

*   true: The request was successful.
*   false: The request failed.', example='true'),
}

model QueryWorksByWorkspaceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryWorksByWorkspaceResponseBody(name='body'),
}

/**
 * @summary The name of the directory.
 *
 * @param request QueryWorksByWorkspaceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryWorksByWorkspaceResponse
 */
async function queryWorksByWorkspaceWithOptions(request: QueryWorksByWorkspaceRequest, runtime: Util.RuntimeOptions): QueryWorksByWorkspaceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.status)) {
    query['Status'] = request.status;
  }
  if (!Util.isUnset(request.thirdPartAuthFlag)) {
    query['ThirdPartAuthFlag'] = request.thirdPartAuthFlag;
  }
  if (!Util.isUnset(request.worksType)) {
    query['WorksType'] = request.worksType;
  }
  if (!Util.isUnset(request.workspaceId)) {
    query['WorkspaceId'] = request.workspaceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryWorksByWorkspace',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary The name of the directory.
 *
 * @param request QueryWorksByWorkspaceRequest
 * @return QueryWorksByWorkspaceResponse
 */
async function queryWorksByWorkspace(request: QueryWorksByWorkspaceRequest): QueryWorksByWorkspaceResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryWorksByWorkspaceWithOptions(request, runtime);
}

model QueryWorkspaceRoleConfigRequest {
  roleId?: long(name='RoleId', description='Workspace role ID, including predefined roles and custom roles:

- 25: Workspace Administrator (predefined role)
- 26: Developer (predefined role)
- 27: Analyst (predefined role)
- 30: Viewer (predefined role)
- Custom role: The corresponding role ID for the custom role

This parameter is required.', example='25'),
}

model QueryWorkspaceRoleConfigResponseBody = {
  requestId?: string(name='RequestId', description='Request ID.', example='D8749D65-E80A-433C-AF1B-CE9C180FF3B4'),
  result?: {
    authConfigList?: [ 
      {
        actionAuthKeys?: [ string ](name='ActionAuthKeys', description='Permission scope.'),
        authKey?: string(name='AuthKey', description='Permission type:
- portal_create: Data Portal
- dashboard_create: Dashboard
- report_create: Spreadsheet
- screen_create: Data Screen
- analysis: Ad-hoc Analysis
- offline_download: Self-service Data Retrieval
- data_form: Data Entry
- quick_etl: Data Preparation
- cube: Dataset
- datasource: Data Source', example='portal_create'),
      }
    ](name='AuthConfigList', description='List of role permission configurations.'),
    isSystemRole?: boolean(name='IsSystemRole', description='Whether it is a predefined role. Value range:

- true: Yes
- false: No', example='true'),
    roleId?: long(name='RoleId', description='Workspace role ID, including predefined roles and custom roles:

- 25: Workspace Administrator (predefined role)
- 26: Developer (predefined role)
- 27: Analyst (predefined role)
- 30: Viewer (predefined role)
- Custom role: The corresponding role ID for the custom role', example='25'),
    roleName?: string(name='RoleName', description='Role name.', example='pace administrator'),
  }(name='Result', description='Returns the query result of the interface.'),
  success?: boolean(name='Success', description='是否请求成功。取值范围：

- true：请求成功
- false：请求失败', example='true'),
}

model QueryWorkspaceRoleConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryWorkspaceRoleConfigResponseBody(name='body'),
}

/**
 * @summary Get Configuration Information for a Specified Workspace Role
 *
 * @param request QueryWorkspaceRoleConfigRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryWorkspaceRoleConfigResponse
 */
async function queryWorkspaceRoleConfigWithOptions(request: QueryWorkspaceRoleConfigRequest, runtime: Util.RuntimeOptions): QueryWorkspaceRoleConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.roleId)) {
    query['RoleId'] = request.roleId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryWorkspaceRoleConfig',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Get Configuration Information for a Specified Workspace Role
 *
 * @param request QueryWorkspaceRoleConfigRequest
 * @return QueryWorkspaceRoleConfigResponse
 */
async function queryWorkspaceRoleConfig(request: QueryWorkspaceRoleConfigRequest): QueryWorkspaceRoleConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryWorkspaceRoleConfigWithOptions(request, runtime);
}

model QueryWorkspaceUserListRequest {
  keyword?: string(name='Keyword'),
  pageNum?: int32(name='PageNum', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  workspaceId?: string(name='WorkspaceId', description='This parameter is required.', example='95296e95-ca89-4c7d-8af9-dedf0ad0****'),
}

model QueryWorkspaceUserListResponseBody = {
  requestId?: string(name='RequestId', example='D787E1A3-A93C-424A-B626-C2B05DF8D885'),
  result?: {
    data?: [ 
      {
        accountId?: string(name='AccountId', example='16020915****8429'),
        accountName?: string(name='AccountName', example='pop****@aliyunid.test'),
        nickName?: string(name='NickName'),
        role?: {
          roleCode?: string(name='RoleCode', example='role_workspace_admin'),
          roleId?: long(name='RoleId', example='25'),
          roleName?: string(name='RoleName'),
        }(name='Role'),
        userId?: string(name='UserId', example='de4bc5f9429141cc8091cdd1c15b****'),
      }
    ](name='Data'),
    pageNum?: int32(name='PageNum', example='1'),
    pageSize?: int32(name='PageSize', example='10'),
    totalNum?: int32(name='TotalNum', example='1'),
    totalPages?: int32(name='TotalPages', example='1'),
  }(name='Result'),
  success?: boolean(name='Success', example='true'),
}

model QueryWorkspaceUserListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryWorkspaceUserListResponseBody(name='body'),
}

/**
 * @summary 查询指定工作空间下的成员列表信息。
 *
 * @param request QueryWorkspaceUserListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryWorkspaceUserListResponse
 */
async function queryWorkspaceUserListWithOptions(request: QueryWorkspaceUserListRequest, runtime: Util.RuntimeOptions): QueryWorkspaceUserListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.keyword)) {
    query['Keyword'] = request.keyword;
  }
  if (!Util.isUnset(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.workspaceId)) {
    query['WorkspaceId'] = request.workspaceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryWorkspaceUserList',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 查询指定工作空间下的成员列表信息。
 *
 * @param request QueryWorkspaceUserListRequest
 * @return QueryWorkspaceUserListResponse
 */
async function queryWorkspaceUserList(request: QueryWorkspaceUserListRequest): QueryWorkspaceUserListResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryWorkspaceUserListWithOptions(request, runtime);
}

model ResultCallbackRequest {
  applicationId?: string(name='ApplicationId', description='The ID of the approval process.

This parameter is required.', example='c5ea0db8-****-****-9081-04bc0df4c6a3'),
  handleReason?: string(name='HandleReason', description='The reason for the approval.

This parameter is required.', example='You are not a Division A analyst.'),
  status?: int32(name='Status', description='Approval result:

*   1: passed
*   2: rejected

This parameter is required.', example='1'),
}

model ResultCallbackResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='D787E1A3-A93C-424A-B626-C2B05DF8D885'),
  result?: boolean(name='Result', description='The execution result of the interface is returned. Valid values:

*   true: The request was successful.
*   false: The request fails.', example='true'),
  success?: boolean(name='Success', description='Indicates whether the request is successful. Valid values:

*   true: The request was successful.
*   false: The request failed.', example='true'),
}

model ResultCallbackResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ResultCallbackResponseBody(name='body'),
}

/**
 * @summary You can customize the callback interface for approval processes to process Quick BI approval processes.
 *
 * @param request ResultCallbackRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ResultCallbackResponse
 */
async function resultCallbackWithOptions(request: ResultCallbackRequest, runtime: Util.RuntimeOptions): ResultCallbackResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.applicationId)) {
    query['ApplicationId'] = request.applicationId;
  }
  if (!Util.isUnset(request.handleReason)) {
    query['HandleReason'] = request.handleReason;
  }
  if (!Util.isUnset(request.status)) {
    query['Status'] = request.status;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ResultCallback',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary You can customize the callback interface for approval processes to process Quick BI approval processes.
 *
 * @param request ResultCallbackRequest
 * @return ResultCallbackResponse
 */
async function resultCallback(request: ResultCallbackRequest): ResultCallbackResponse {
  var runtime = new Util.RuntimeOptions{};
  return resultCallbackWithOptions(request, runtime);
}

model SaveFavoritesRequest {
  userId?: string(name='UserId', description='The user ID of the collection. The user ID is the UserID of the Quick BI, not the UID of Alibaba Cloud.

This parameter is required.', example='121344444790****'),
  worksId?: string(name='WorksId', description='The ID of the collection.

This parameter is required.', example='d23e84a1-82a0-4292-bfdb-521306c3****'),
}

model SaveFavoritesResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='D787E1A3-A93C-424A-B626-C2B05DF8D885'),
  result?: boolean(name='Result', description='The execution result of the interface is returned. Valid values:

*   true: The request was successful.
*   false: The request fails.', example='true'),
  success?: boolean(name='Success', description='Indicates whether the request is successful. Valid values:

*   true: The request was successful.
*   false: The request failed.', example='true'),
}

model SaveFavoritesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SaveFavoritesResponseBody(name='body'),
}

/**
 * @summary Add the user\\"s collection data works.
 *
 * @param request SaveFavoritesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SaveFavoritesResponse
 */
async function saveFavoritesWithOptions(request: SaveFavoritesRequest, runtime: Util.RuntimeOptions): SaveFavoritesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.userId)) {
    query['UserId'] = request.userId;
  }
  if (!Util.isUnset(request.worksId)) {
    query['WorksId'] = request.worksId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SaveFavorites',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Add the user\\"s collection data works.
 *
 * @param request SaveFavoritesRequest
 * @return SaveFavoritesResponse
 */
async function saveFavorites(request: SaveFavoritesRequest): SaveFavoritesResponse {
  var runtime = new Util.RuntimeOptions{};
  return saveFavoritesWithOptions(request, runtime);
}

model SetDataLevelPermissionExtraConfigRequest {
  cubeId?: string(name='CubeId', description='This parameter is required.', example='7c7223ae-******-3c744528014b'),
  missHitPolicy?: string(name='MissHitPolicy', description='This parameter is required.', example='NONE'),
  ruleType?: string(name='RuleType', description='This parameter is required.', example='ROW_LEVEL'),
}

model SetDataLevelPermissionExtraConfigResponseBody = {
  requestId?: string(name='RequestId', example='B70E1FBD-E533-52F2-A7A1-E02B92F78DDF'),
  result?: boolean(name='Result', example='true'),
  success?: boolean(name='Success', example='true'),
}

model SetDataLevelPermissionExtraConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SetDataLevelPermissionExtraConfigResponseBody(name='body'),
}

/**
 * @summary 设置行列权限的额外配置
 *
 * @param request SetDataLevelPermissionExtraConfigRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SetDataLevelPermissionExtraConfigResponse
 */
async function setDataLevelPermissionExtraConfigWithOptions(request: SetDataLevelPermissionExtraConfigRequest, runtime: Util.RuntimeOptions): SetDataLevelPermissionExtraConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.cubeId)) {
    query['CubeId'] = request.cubeId;
  }
  if (!Util.isUnset(request.missHitPolicy)) {
    query['MissHitPolicy'] = request.missHitPolicy;
  }
  if (!Util.isUnset(request.ruleType)) {
    query['RuleType'] = request.ruleType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetDataLevelPermissionExtraConfig',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 设置行列权限的额外配置
 *
 * @param request SetDataLevelPermissionExtraConfigRequest
 * @return SetDataLevelPermissionExtraConfigResponse
 */
async function setDataLevelPermissionExtraConfig(request: SetDataLevelPermissionExtraConfigRequest): SetDataLevelPermissionExtraConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return setDataLevelPermissionExtraConfigWithOptions(request, runtime);
}

model SetDataLevelPermissionRuleConfigRequest {
  ruleModel?: string(name='RuleModel', description='This parameter is required.'),
}

model SetDataLevelPermissionRuleConfigResponseBody = {
  requestId?: string(name='RequestId', example='D8749D65-E80A-433C-AF1B-CE9C180FF3B4'),
  result?: string(name='Result'),
  success?: boolean(name='Success', example='true'),
}

model SetDataLevelPermissionRuleConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SetDataLevelPermissionRuleConfigResponseBody(name='body'),
}

/**
 * @summary 设置单条数据集行列权限配置信息（新增和更新）
 *
 * @param request SetDataLevelPermissionRuleConfigRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SetDataLevelPermissionRuleConfigResponse
 */
async function setDataLevelPermissionRuleConfigWithOptions(request: SetDataLevelPermissionRuleConfigRequest, runtime: Util.RuntimeOptions): SetDataLevelPermissionRuleConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ruleModel)) {
    query['RuleModel'] = request.ruleModel;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetDataLevelPermissionRuleConfig',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 设置单条数据集行列权限配置信息（新增和更新）
 *
 * @param request SetDataLevelPermissionRuleConfigRequest
 * @return SetDataLevelPermissionRuleConfigResponse
 */
async function setDataLevelPermissionRuleConfig(request: SetDataLevelPermissionRuleConfigRequest): SetDataLevelPermissionRuleConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return setDataLevelPermissionRuleConfigWithOptions(request, runtime);
}

model SetDataLevelPermissionWhiteListRequest {
  whiteListModel?: string(name='WhiteListModel', description='{ "ruleType": "ROW_LEVEL", // The row-level permission type. "usersModel": { "userGroups": [ "0d5fb19b- ***-1248 fc27ca51", // The ID of the user group. "3d2c23d4-***-f6390f325c2d" ], "users": [ "4334 ***358", // Quick BI the UserID of the user. "Huang***3fa822" ] }, "cubeId": "7c7223ae-31d1-4d2f-b11f-3c744528014b" }

This parameter is required.', example='{"ruleType":"ROW_LEVEL","usersModel":{"userGroups":["26edcb76-****-bdbab78267cb","187e6dd5-1611-4cf7-a034-1a93bd5fecf9"],"users":["4334***358","Huang***3fa822"]},"cubeId":"7c7223ae-****44528014b"}'),
}

model SetDataLevelPermissionWhiteListResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='D8749D65-E80A-433C-AF1B-CE9C180FF3B4'),
  result?: boolean(name='Result', description='The execution result of the interface. Valid values:

*   true: The request was successful.
*   false: The request failed.', example='true'),
  success?: boolean(name='Success', description='Indicates whether the request is successful. Valid values:

*   true: The request was successful.
*   false: The request failed.', example='true'),
}

model SetDataLevelPermissionWhiteListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SetDataLevelPermissionWhiteListResponseBody(name='body'),
}

/**
 * @summary Sets the whitelist for the specified row-level permissions.
 *
 * @description > : You can only Quick BI the new row-column permission model. If you are still using the old row-column permission model, migrate to the new row-column permission model before you call this operation. To migrate row-level permissions to the new row-level permission model, perform the following steps: Choose Organizations> Security Configurations> Upgrade Row-Level Permissions. On the Upgrade Row-Level Permissions page, click **Upgrade**.
 *
 * @param request SetDataLevelPermissionWhiteListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SetDataLevelPermissionWhiteListResponse
 */
async function setDataLevelPermissionWhiteListWithOptions(request: SetDataLevelPermissionWhiteListRequest, runtime: Util.RuntimeOptions): SetDataLevelPermissionWhiteListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.whiteListModel)) {
    query['WhiteListModel'] = request.whiteListModel;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetDataLevelPermissionWhiteList',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Sets the whitelist for the specified row-level permissions.
 *
 * @description > : You can only Quick BI the new row-column permission model. If you are still using the old row-column permission model, migrate to the new row-column permission model before you call this operation. To migrate row-level permissions to the new row-level permission model, perform the following steps: Choose Organizations> Security Configurations> Upgrade Row-Level Permissions. On the Upgrade Row-Level Permissions page, click **Upgrade**.
 *
 * @param request SetDataLevelPermissionWhiteListRequest
 * @return SetDataLevelPermissionWhiteListResponse
 */
async function setDataLevelPermissionWhiteList(request: SetDataLevelPermissionWhiteListRequest): SetDataLevelPermissionWhiteListResponse {
  var runtime = new Util.RuntimeOptions{};
  return setDataLevelPermissionWhiteListWithOptions(request, runtime);
}

model SmartqAuthTransferRequest {
  originUserId?: string(name='OriginUserId', description='This parameter is required.', example='ASDHASD*************12EASDA'),
  targetUserIds?: string(name='TargetUserIds', description='This parameter is required.', example='12313********dasfa,ASDASF*****SDAFEEG'),
}

model SmartqAuthTransferResponseBody = {
  requestId?: string(name='RequestId', example='D787E1*****************5DF8D885'),
  result?: boolean(name='Result', example='true'),
  success?: boolean(name='Success', example='true'),
}

model SmartqAuthTransferResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SmartqAuthTransferResponseBody(name='body'),
}

/**
 * @summary 将指定用户的问数权限同步给其他用户
 *
 * @param request SmartqAuthTransferRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SmartqAuthTransferResponse
 */
async function smartqAuthTransferWithOptions(request: SmartqAuthTransferRequest, runtime: Util.RuntimeOptions): SmartqAuthTransferResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.originUserId)) {
    query['OriginUserId'] = request.originUserId;
  }
  if (!Util.isUnset(request.targetUserIds)) {
    query['TargetUserIds'] = request.targetUserIds;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SmartqAuthTransfer',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 将指定用户的问数权限同步给其他用户
 *
 * @param request SmartqAuthTransferRequest
 * @return SmartqAuthTransferResponse
 */
async function smartqAuthTransfer(request: SmartqAuthTransferRequest): SmartqAuthTransferResponse {
  var runtime = new Util.RuntimeOptions{};
  return smartqAuthTransferWithOptions(request, runtime);
}

model SmartqAuthorizeRequest {
  expireDay?: string(name='ExpireDay', example='2099-12-31'),
  llmCubeThemes?: string(name='LlmCubeThemes', example='wasdasd*******1235235sd,ASDAS*********ASDAW123'),
  llmCubes?: string(name='LlmCubes', example='wasdasd*******1235235sd,ASDAS*********ASDAW123'),
  operationType?: int32(name='OperationType', description='This parameter is required.', example='0'),
  userIds?: string(name='UserIds', description='This parameter is required.', example='wasdasd*******1235235sd,ASDAS*********ASDAW123'),
}

model SmartqAuthorizeResponseBody = {
  requestId?: string(name='RequestId', example='617277C****************ABA47E31'),
  result?: [ 
    {
      detailMessage?: string(name='DetailMessage', example='INVALID_FILE_FORMAT'),
      llmCube?: string(name='LlmCube', example='617277C****************ABA47E31'),
      llmCubeTheme?: string(name='LlmCubeTheme', example='617277C****************ABA47E31'),
      userId?: string(name='UserId', example='617277C****************ABA47E31'),
    }
  ](name='Result'),
  success?: boolean(name='Success', example='true'),
}

model SmartqAuthorizeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SmartqAuthorizeResponseBody(name='body'),
}

/**
 * @summary 批量管理智能问数的授权
 *
 * @param request SmartqAuthorizeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SmartqAuthorizeResponse
 */
async function smartqAuthorizeWithOptions(request: SmartqAuthorizeRequest, runtime: Util.RuntimeOptions): SmartqAuthorizeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.expireDay)) {
    query['ExpireDay'] = request.expireDay;
  }
  if (!Util.isUnset(request.llmCubeThemes)) {
    query['LlmCubeThemes'] = request.llmCubeThemes;
  }
  if (!Util.isUnset(request.llmCubes)) {
    query['LlmCubes'] = request.llmCubes;
  }
  if (!Util.isUnset(request.operationType)) {
    query['OperationType'] = request.operationType;
  }
  if (!Util.isUnset(request.userIds)) {
    query['UserIds'] = request.userIds;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SmartqAuthorize',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 批量管理智能问数的授权
 *
 * @param request SmartqAuthorizeRequest
 * @return SmartqAuthorizeResponse
 */
async function smartqAuthorize(request: SmartqAuthorizeRequest): SmartqAuthorizeResponse {
  var runtime = new Util.RuntimeOptions{};
  return smartqAuthorizeWithOptions(request, runtime);
}

model SmartqQueryAbilityRequest {
  cubeId?: string(name='CubeId', description='This parameter is required.', example='7c7223ae-****-3c744528014b'),
  userId?: string(name='UserId', example='7c7223ae-****-3c744528014b'),
  userQuestion?: string(name='UserQuestion', description='This parameter is required.'),
}

model SmartqQueryAbilityResponseBody = {
  requestId?: string(name='RequestId', example='D787E1A3-A************2B05DF8D885'),
  result?: {
    chartType?: string(name='ChartType'),
    conclusionText?: string(name='ConclusionText', nullable=true),
    logicSql?: string(name='LogicSql'),
    metaType?: [ 
      {
        key?: string(name='Key', example='Polar***STPS'),
        value?: string(name='Value', example='string'),
      }
    ](name='MetaType'),
    values?: [ 
      {
        row?: [ string ](name='Row', nullable=true),
      }
    ](name='Values'),
  }(name='Result'),
  success?: boolean(name='Success', description='This parameter is required.', example='true'),
}

model SmartqQueryAbilityResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SmartqQueryAbilityResponseBody(name='body'),
}

/**
 * @summary 问数能力开放
 *
 * @param request SmartqQueryAbilityRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SmartqQueryAbilityResponse
 */
async function smartqQueryAbilityWithOptions(request: SmartqQueryAbilityRequest, runtime: Util.RuntimeOptions): SmartqQueryAbilityResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.cubeId)) {
    query['CubeId'] = request.cubeId;
  }
  if (!Util.isUnset(request.userId)) {
    query['UserId'] = request.userId;
  }
  if (!Util.isUnset(request.userQuestion)) {
    query['UserQuestion'] = request.userQuestion;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SmartqQueryAbility',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 问数能力开放
 *
 * @param request SmartqQueryAbilityRequest
 * @return SmartqQueryAbilityResponse
 */
async function smartqQueryAbility(request: SmartqQueryAbilityRequest): SmartqQueryAbilityResponse {
  var runtime = new Util.RuntimeOptions{};
  return smartqQueryAbilityWithOptions(request, runtime);
}

model UpdateDataLevelPermissionStatusRequest {
  cubeId?: string(name='CubeId', description='The ID of the training dataset that you want to remove from the specified custom linguistic model.

This parameter is required.', example='7c7223ae-****-3c744528014b'),
  isOpen?: int32(name='IsOpen', description='This parameter is required.', example='1'),
  ruleType?: string(name='RuleType', description='This parameter is required.', example='ROW_LEVEL'),
}

model UpdateDataLevelPermissionStatusResponseBody = {
  requestId?: string(name='RequestId', example='D8749D65-E80A-433C-AF1B-CE9C180FF3B4'),
  result?: boolean(name='Result', example='true'),
  success?: boolean(name='Success', example='true'),
}

model UpdateDataLevelPermissionStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateDataLevelPermissionStatusResponseBody(name='body'),
}

/**
 * @summary Indicates whether the request is successful. Valid values:
 * *   true: The request was successful.
 * *   false: The request failed.
 *
 * @description The execution result of the interface. Valid values:
 * *   true: The request was successful.
 * *   false: The request failed.
 *
 * @param request UpdateDataLevelPermissionStatusRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateDataLevelPermissionStatusResponse
 */
async function updateDataLevelPermissionStatusWithOptions(request: UpdateDataLevelPermissionStatusRequest, runtime: Util.RuntimeOptions): UpdateDataLevelPermissionStatusResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.cubeId)) {
    query['CubeId'] = request.cubeId;
  }
  if (!Util.isUnset(request.isOpen)) {
    query['IsOpen'] = request.isOpen;
  }
  if (!Util.isUnset(request.ruleType)) {
    query['RuleType'] = request.ruleType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateDataLevelPermissionStatus',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Indicates whether the request is successful. Valid values:
 * *   true: The request was successful.
 * *   false: The request failed.
 *
 * @description The execution result of the interface. Valid values:
 * *   true: The request was successful.
 * *   false: The request failed.
 *
 * @param request UpdateDataLevelPermissionStatusRequest
 * @return UpdateDataLevelPermissionStatusResponse
 */
async function updateDataLevelPermissionStatus(request: UpdateDataLevelPermissionStatusRequest): UpdateDataLevelPermissionStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateDataLevelPermissionStatusWithOptions(request, runtime);
}

model UpdateEmbeddedStatusRequest {
  thirdPartAuthFlag?: boolean(name='ThirdPartAuthFlag', description='This parameter is required.', example='true'),
  worksId?: string(name='WorksId', description='This parameter is required.', example='897ce25e-f993-4abd-af84-d13c5610****'),
}

model UpdateEmbeddedStatusResponseBody = {
  requestId?: string(name='RequestId', example='D787E1A3-A93C-424A-B626-C2B05DF8D885'),
  result?: int32(name='Result', example='1'),
  success?: boolean(name='Success', example='true'),
}

model UpdateEmbeddedStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateEmbeddedStatusResponseBody(name='body'),
}

/**
 * @summary The ID of the request.
 *
 * @param request UpdateEmbeddedStatusRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateEmbeddedStatusResponse
 */
async function updateEmbeddedStatusWithOptions(request: UpdateEmbeddedStatusRequest, runtime: Util.RuntimeOptions): UpdateEmbeddedStatusResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.thirdPartAuthFlag)) {
    query['ThirdPartAuthFlag'] = request.thirdPartAuthFlag;
  }
  if (!Util.isUnset(request.worksId)) {
    query['WorksId'] = request.worksId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateEmbeddedStatus',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary The ID of the request.
 *
 * @param request UpdateEmbeddedStatusRequest
 * @return UpdateEmbeddedStatusResponse
 */
async function updateEmbeddedStatus(request: UpdateEmbeddedStatusRequest): UpdateEmbeddedStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateEmbeddedStatusWithOptions(request, runtime);
}

model UpdateTicketNumRequest {
  ticket?: string(name='Ticket', description='This parameter is required.', example='040e6f79d33444838***83c7206c070'),
  ticketNum?: int32(name='TicketNum', description='This parameter is required.', example='1'),
}

model UpdateTicketNumResponseBody = {
  requestId?: string(name='RequestId', example='D787E1A3-A93C-424A-B626-C2B05DF8D885'),
  result?: boolean(name='Result', example='true'),
  success?: boolean(name='Success', example='true'),
}

model UpdateTicketNumResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateTicketNumResponseBody(name='body'),
}

/**
 * @summary 更新三方嵌入ticket的票据数量
 *
 * @param request UpdateTicketNumRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateTicketNumResponse
 */
async function updateTicketNumWithOptions(request: UpdateTicketNumRequest, runtime: Util.RuntimeOptions): UpdateTicketNumResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ticket)) {
    query['Ticket'] = request.ticket;
  }
  if (!Util.isUnset(request.ticketNum)) {
    query['TicketNum'] = request.ticketNum;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateTicketNum',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 更新三方嵌入ticket的票据数量
 *
 * @param request UpdateTicketNumRequest
 * @return UpdateTicketNumResponse
 */
async function updateTicketNum(request: UpdateTicketNumRequest): UpdateTicketNumResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateTicketNumWithOptions(request, runtime);
}

model UpdateUserRequest {
  adminUser?: boolean(name='AdminUser', description='Indicates whether the organization administrator. Valid values:

*   true
*   false', example='true', nullable=false),
  authAdminUser?: boolean(name='AuthAdminUser', description='Indicate whether the RAM user is a permission administrator. Valid values:

*   true
*   false', example='true'),
  isDeleted?: boolean(name='IsDeleted'),
  nickName?: string(name='NickName', description='The nickname of the account.

*   Format check: The value can be up to 50 characters in length.
*   Special format verification: Chinese and English digits_ \\\\ / | () ] [', example='Xiao Zhang'),
  roleIds?: string(name='RoleIds'),
  userId?: string(name='UserId', description='The ID of the user to be updated. The user ID is the UserID of the Quick BI, not the UID of Alibaba Cloud.

This parameter is required.', example='fe67f61a35a94b7da1a34ba174a7****'),
  userType?: int32(name='UserType', description='The role type of the organization member. Valid values:

*   1 : developer
*   2 : visitors
*   3 : Analyst', example='1'),
}

model UpdateUserResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='DC4E1E63-B337-44F8-8C22-6F00DF67E2C3'),
  result?: boolean(name='Result', description='The execution result of the interface is returned. Valid values:

*   true: The request was successful.
*   false: The request fails.', example='true'),
  success?: boolean(name='Success', description='Indicates whether the request is successful. Valid values:

*   true: The request was successful.
*   false: The request failed.', example='true'),
}

model UpdateUserResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateUserResponseBody(name='body'),
}

/**
 * @summary Updates the information of a specified member in an organization.
 *
 * @param request UpdateUserRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateUserResponse
 */
async function updateUserWithOptions(request: UpdateUserRequest, runtime: Util.RuntimeOptions): UpdateUserResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.adminUser)) {
    query['AdminUser'] = request.adminUser;
  }
  if (!Util.isUnset(request.authAdminUser)) {
    query['AuthAdminUser'] = request.authAdminUser;
  }
  if (!Util.isUnset(request.isDeleted)) {
    query['IsDeleted'] = request.isDeleted;
  }
  if (!Util.isUnset(request.nickName)) {
    query['NickName'] = request.nickName;
  }
  if (!Util.isUnset(request.roleIds)) {
    query['RoleIds'] = request.roleIds;
  }
  if (!Util.isUnset(request.userId)) {
    query['UserId'] = request.userId;
  }
  if (!Util.isUnset(request.userType)) {
    query['UserType'] = request.userType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateUser',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Updates the information of a specified member in an organization.
 *
 * @param request UpdateUserRequest
 * @return UpdateUserResponse
 */
async function updateUser(request: UpdateUserRequest): UpdateUserResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateUserWithOptions(request, runtime);
}

model UpdateUserGroupRequest {
  userGroupDescription?: string(name='UserGroupDescription', description='The description of the user group.

*   Format verification: Maximum length 255
*   Special format verification: Chinese and English digits_ \\\\ / | () ] [', example='Description'),
  userGroupId?: string(name='UserGroupId', description='The ID of the user group.

This parameter is required.', example='f5eeb52e-d9c2-4a8b-80e3-47ab55c2****'),
  userGroupName?: string(name='UserGroupName', description='The name of the user group.

*   Format verification: Maximum length 255
*   Special format verification: Chinese and English digits_ \\\\ / | () ] [', example='pop0001'),
}

model UpdateUserGroupResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='4AEF8C5C-D5D2-55D3-BB2F-9D3AA1B6F4FA'),
  result?: boolean(name='Result', description='Whether the interface is successfully executed. Valid values:

*   true: The request was successful.
*   false: The request fails.', example='true'),
  success?: boolean(name='Success', description='Indicates whether the request is successful. Valid values:

*   true: The request was successful.
*   false: The request failed.', example='true'),
}

model UpdateUserGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateUserGroupResponseBody(name='body'),
}

/**
 * @summary Updates information about a specified user group in an organization.
 *
 * @param request UpdateUserGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateUserGroupResponse
 */
async function updateUserGroupWithOptions(request: UpdateUserGroupRequest, runtime: Util.RuntimeOptions): UpdateUserGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.userGroupDescription)) {
    query['UserGroupDescription'] = request.userGroupDescription;
  }
  if (!Util.isUnset(request.userGroupId)) {
    query['UserGroupId'] = request.userGroupId;
  }
  if (!Util.isUnset(request.userGroupName)) {
    query['UserGroupName'] = request.userGroupName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateUserGroup',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Updates information about a specified user group in an organization.
 *
 * @param request UpdateUserGroupRequest
 * @return UpdateUserGroupResponse
 */
async function updateUserGroup(request: UpdateUserGroupRequest): UpdateUserGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateUserGroupWithOptions(request, runtime);
}

model UpdateUserTagMetaRequest {
  tagDescription?: string(name='TagDescription', description='The tag description.

- Format check: Maximum length is 255 characters.', example='Job Positions within the Department'),
  tagId?: string(name='TagId', description='The specified TagID.

- Format check: Maximum length is 64 characters.

This parameter is required.', example='e82f6c6c0333431bad0225b2f85e****'),
  tagName?: string(name='TagName', description='The tag name.
- Format check: Maximum length is 50 characters.
- Only Chinese, English, numbers, and /\\\\|[]() symbols are allowed.

This parameter is required.', example='Department'),
}

model UpdateUserTagMetaResponseBody = {
  requestId?: string(name='RequestId', description='Request ID.', example='D787E1A3-A93C-424A-B626-C2B05DF8D885'),
  result?: boolean(name='Result', description='Indicates whether the interface was executed successfully. Possible values:

- true: Execution succeeded
- false: Execution failed', example='true'),
  success?: boolean(name='Success', description='Indicates whether the request was successful. Possible values:
- true: The request succeeded - false: The request failed', example='true'),
}

model UpdateUserTagMetaResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateUserTagMetaResponseBody(name='body'),
}

/**
 * @summary Used for updating the metadata of organization member tags
 *
 * @param request UpdateUserTagMetaRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateUserTagMetaResponse
 */
async function updateUserTagMetaWithOptions(request: UpdateUserTagMetaRequest, runtime: Util.RuntimeOptions): UpdateUserTagMetaResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.tagDescription)) {
    query['TagDescription'] = request.tagDescription;
  }
  if (!Util.isUnset(request.tagId)) {
    query['TagId'] = request.tagId;
  }
  if (!Util.isUnset(request.tagName)) {
    query['TagName'] = request.tagName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateUserTagMeta',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Used for updating the metadata of organization member tags
 *
 * @param request UpdateUserTagMetaRequest
 * @return UpdateUserTagMetaResponse
 */
async function updateUserTagMeta(request: UpdateUserTagMetaRequest): UpdateUserTagMetaResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateUserTagMetaWithOptions(request, runtime);
}

model UpdateUserTagValueRequest {
  tagId?: string(name='TagId', description='The ID of the tag to be modified.

This parameter is required.', example='pop_001'),
  tagValue?: string(name='TagValue', description='The tag value to be modified.

- To clear this tag, set the tag value to ($NULL$).
- For multiple values, use English commas to separate them.
- Format validation, maximum length: 3000 characters

This parameter is required.', example='Product Director'),
  userId?: string(name='UserId', description='The user ID for which the tag value is to be modified. This user ID refers to the Quick BI UserID, not the Alibaba Cloud UID.

This parameter is required.', example='fe67f61a35a94b7da1a34ba174a7****'),
}

model UpdateUserTagValueResponseBody = {
  requestId?: string(name='RequestId', description='Request ID.', example='46e5374665ba4b679ee22e2a29270'),
  result?: boolean(name='Result', description='Returns the result of modifying the user tag. Possible values:

- true: Operation succeeded
- false: Operation failed', example='true'),
  success?: boolean(name='Success', description='Indicates whether the request was successful. Value range:
- true: The request was successful - false: The request failed', example='true'),
}

model UpdateUserTagValueResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateUserTagValueResponseBody(name='body'),
}

/**
 * @summary Update the tag value of an organization member.
 *
 * @param request UpdateUserTagValueRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateUserTagValueResponse
 */
async function updateUserTagValueWithOptions(request: UpdateUserTagValueRequest, runtime: Util.RuntimeOptions): UpdateUserTagValueResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.tagId)) {
    query['TagId'] = request.tagId;
  }
  if (!Util.isUnset(request.tagValue)) {
    query['TagValue'] = request.tagValue;
  }
  if (!Util.isUnset(request.userId)) {
    query['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateUserTagValue',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Update the tag value of an organization member.
 *
 * @param request UpdateUserTagValueRequest
 * @return UpdateUserTagValueResponse
 */
async function updateUserTagValue(request: UpdateUserTagValueRequest): UpdateUserTagValueResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateUserTagValueWithOptions(request, runtime);
}

model UpdateWorkspaceUserRoleRequest {
  roleId?: long(name='RoleId', example='25', deprecated=true),
  roleIds?: string(name='RoleIds'),
  userId?: string(name='UserId', description='This parameter is required.', example='f5698bedeb384b1986afccd9e434****'),
  workspaceId?: string(name='WorkspaceId', description='This parameter is required.', example='95296e95-ca89-4c7d-8af9-dedf0ad0****'),
}

model UpdateWorkspaceUserRoleResponseBody = {
  requestId?: string(name='RequestId', example='D787E1A3-A93C-424A-B626-C2B05DF8D885'),
  result?: boolean(name='Result', example='true'),
  success?: boolean(name='Success', example='true'),
}

model UpdateWorkspaceUserRoleResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateWorkspaceUserRoleResponseBody(name='body'),
}

/**
 * @summary 修改工作空间下指定成员的角色，已有的角色会被覆盖
 *
 * @param request UpdateWorkspaceUserRoleRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateWorkspaceUserRoleResponse
 */
async function updateWorkspaceUserRoleWithOptions(request: UpdateWorkspaceUserRoleRequest, runtime: Util.RuntimeOptions): UpdateWorkspaceUserRoleResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.roleId)) {
    query['RoleId'] = request.roleId;
  }
  if (!Util.isUnset(request.roleIds)) {
    query['RoleIds'] = request.roleIds;
  }
  if (!Util.isUnset(request.userId)) {
    query['UserId'] = request.userId;
  }
  if (!Util.isUnset(request.workspaceId)) {
    query['WorkspaceId'] = request.workspaceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateWorkspaceUserRole',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 修改工作空间下指定成员的角色，已有的角色会被覆盖
 *
 * @param request UpdateWorkspaceUserRoleRequest
 * @return UpdateWorkspaceUserRoleResponse
 */
async function updateWorkspaceUserRole(request: UpdateWorkspaceUserRoleRequest): UpdateWorkspaceUserRoleResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateWorkspaceUserRoleWithOptions(request, runtime);
}

model UpdateWorkspaceUsersRoleRequest {
  roleId?: long(name='RoleId', description='This parameter is required.', example='25'),
  userIds?: string(name='UserIds', description='This parameter is required.', example='136516262323****,124498444445****'),
  workspaceId?: string(name='WorkspaceId', description='This parameter is required.', example='95296e95-ca89-4c7d-8af9-dedf0ad0****'),
}

model UpdateWorkspaceUsersRoleResponseBody = {
  requestId?: string(name='RequestId', example='7AAB95D7-2E11-4FE2-94BC-858E4FC0C976'),
  result?: {
    failure?: int32(name='Failure', example='0'),
    failureDetail?: map[string]any(name='FailureDetail'),
    success?: int32(name='Success', example='2'),
    total?: int32(name='Total', example='2'),
  }(name='Result'),
  success?: boolean(name='Success', example='true'),
}

model UpdateWorkspaceUsersRoleResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateWorkspaceUsersRoleResponseBody(name='body'),
}

/**
 * @summary 批量更新工作空间成员的角色信息，已有角色会被覆盖
 *
 * @param request UpdateWorkspaceUsersRoleRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateWorkspaceUsersRoleResponse
 */
async function updateWorkspaceUsersRoleWithOptions(request: UpdateWorkspaceUsersRoleRequest, runtime: Util.RuntimeOptions): UpdateWorkspaceUsersRoleResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.roleId)) {
    query['RoleId'] = request.roleId;
  }
  if (!Util.isUnset(request.userIds)) {
    query['UserIds'] = request.userIds;
  }
  if (!Util.isUnset(request.workspaceId)) {
    query['WorkspaceId'] = request.workspaceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateWorkspaceUsersRole',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 批量更新工作空间成员的角色信息，已有角色会被覆盖
 *
 * @param request UpdateWorkspaceUsersRoleRequest
 * @return UpdateWorkspaceUsersRoleResponse
 */
async function updateWorkspaceUsersRole(request: UpdateWorkspaceUsersRoleRequest): UpdateWorkspaceUsersRoleResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateWorkspaceUsersRoleWithOptions(request, runtime);
}

model WithdrawAllUserGroupsRequest {
  userId?: string(name='UserId', description='The ID of the user. The UserID of the Quick BI is used instead of the UID of Alibaba Cloud.

This parameter is required.', example='46e5374665ba4b679ee22e2a2927****'),
}

model WithdrawAllUserGroupsResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='D8749D65-E80A-433C-AF1B-CE9C180FF3B4'),
  result?: boolean(name='Result', description='The execution result of the interface is returned. Valid values:

*   true: The request was successful.
*   false: The request fails.', example='true'),
  success?: boolean(name='Success', description='Indicates whether the request is successful. Valid values:

*   true: The request was successful.
*   false: The request failed.', example='true'),
}

model WithdrawAllUserGroupsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: WithdrawAllUserGroupsResponseBody(name='body'),
}

/**
 * @summary Make the user exit all user groups. This process is irreversible. Exercise caution when performing this operation.
 *
 * @param request WithdrawAllUserGroupsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return WithdrawAllUserGroupsResponse
 */
async function withdrawAllUserGroupsWithOptions(request: WithdrawAllUserGroupsRequest, runtime: Util.RuntimeOptions): WithdrawAllUserGroupsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.userId)) {
    query['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'WithdrawAllUserGroups',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Make the user exit all user groups. This process is irreversible. Exercise caution when performing this operation.
 *
 * @param request WithdrawAllUserGroupsRequest
 * @return WithdrawAllUserGroupsResponse
 */
async function withdrawAllUserGroups(request: WithdrawAllUserGroupsRequest): WithdrawAllUserGroupsResponse {
  var runtime = new Util.RuntimeOptions{};
  return withdrawAllUserGroupsWithOptions(request, runtime);
}

